Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2010
    Thanked 0 Times in 0 Posts

    Checkbox color change...and back

    im trying to figure out a script

    that when someone clicks my checkbox (or onchange/onclick events the span tag that wraps it) it changes the color of the font in the span tag...

    but then if they click again...for the color to return to normal

    heres my checkboxes as of the moment... disregard the sloppy multiple classes....i wanted to pad the elements evenly lol

      <div id="selectform">
               <span onclick="id='colorchange'"  class="webspace"><input type="checkbox"  value="website"> Website Design
                <span class="reverbspace"> <input type="checkbox"  value="reverb"> Reverb Nation </span>
                 <span class="twitspace"><input type="checkbox"  value="twitter"> Twitter </span>
                <span class="logospace"> <input type="checkbox"  value="logo"> Logo/Branding </span>
                <span class="soundclickspace"> <input type="checkbox"  value="ning"> SoundClick </span>
                <span class="photospace"> <input type="checkbox"  value="photo"> Photo Retouch </span>
                 <span class="albumspace"><input type="checkbox" value="Album/Mixtape/DVD"> Mixtape/ DVD Cover</span>
                <span class="ningspace"> <input type="checkbox"  value="ning"> Ning WebSite  </span>
               <span class="flyerspace">  <input type="checkbox"  value="flyer"> Flyers  </span>
                <span class="businessspace"> <input type="checkbox"  value="Business card"> Business Card </span>
                <span class="brochurespace"> <input type="checkbox"  value="Brochure"> Brochure </span>
                <span class="otherspace">  <input type="checkbox" > Other </span>

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,662 Times in 2,631 Posts
    Despite the similar sounding names, Java is not the same as Javascript.
    Moving from Java forum to Javascript forum.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts