7:31:46 AM
Thursday
Sep 09
Su M Tu W Th F Sa
567891011
12131415161718
19202122232425
262728293012
3456789

Play My Typing Game

View Some of My Artwork

Check a checkbox by clicking on its text
<script type="text/javascript">
function check_box(id){
 var field = "document.f."+id+".checked";
 if(eval(field)==true){ eval(field+"=false"); }
 else{ eval(field+"=true"); }
}
</script>


This function assumes the form is named 'f', so adjust it accordingly or revamp the function to receive form names too.

Usually it isn't a good idea to use eval(), which evaluates a string as if it were code. I found this script a long time ago and it works like a champ, tested in windows IE6, IE7, FF1.5, FF2, Safari 3, Opera 9, MAC Safari.

Example Usage:
<form name="f" onsubmit="return false;">
<input type="checkbox" name="ch1" />
<span onclick="check_box('ch1');">Checkbox One</span><br />
<input type="checkbox" name="ch2" />
<span onclick="check_box('ch2');">Checkbox One</span><br />
</form>



Read Previous:
Image Flips with Preload
Read Next:
A function to read the value of a radio input
Table of Contents


Give a listen to my music...
My Best Recordings
How my services and skills can help you:
  • Global (via Email/Skype/AIM(ichat)/Yahoo)
    • Web Development Consulting
    • Custom Web App Development (PHP/MySQL/jQuery/CSS) Cross-Browser & OS
    • Cellphone App Development (Android/MobileWeb)
    • Music Lessons & Education for Beginner Guitar, Piano, Bass, which transfers over to many other instruments I am comfortable playing but not yet at teaching.
    • Music - Soundtrack Composition & Voice Work
  • Local
    • Most all the above, but also:
      • Music Performance (Harp, Voice, Guitar, Piano, Bass, Latin Percussion)
      • Recording Live Music Audio
      • Video Streaming live music and other live events anywhere that can provide wifi
      • Training Video Streaming to your venue's trusted soundperson
Skills:
  • Global (via Email/Skype/AIM(ichat)/Yahoo)
    • Web Development Consulting
    • Custom Web App Development (PHP/MySQL/jQuery/CSS) Cross-Browser & OS
    • Cellphone App Development (Android/MobileWeb)
    • Music Lessons & Education for Beginner Guitar, Piano, Bass, which transfers over to many other instruments I am comfortable playing but not yet at teaching.
    • Music - Soundtrack Composition & Voice Work
  • Local, Most all the above, but also:
    • Music Performance (Harp, Voice, Guitar, Piano, Bass, Latin Percussion)
    • Being your venue's soundman
    • Video Streaming live music and other live events anywhere that can provide wifi
    • Training Video Streaming to your venue's trusted soundperson