Results 1 to 3 of 3

Thread: Problem with radio button reset??

  1. #1
    Join Date
    Jun 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Problem with radio button reset??

    Have a little problem with a script. It works fine but it does not change icon back to default one on first radio button when you move focus on to a next radio button.
    Thought work correctly with checkboxes.

    Any help appriciated??

    <script type="text/javascript">
    function changeIcon(chk,icon){
    if (chk.checked){
    document.icon.src="images/i_s001_on.gif";
    }else{
    document.icon.src="images/i_s001.gif";
    }
    </script>
    <input name="sent_opt1" type="checkbox" value="be_notified" onClick="changeIcon(this,icon);"/>
    <img src="images/i_s001.gif" width="21" height="21" name="icon"/> Be notified
    <input name="sent_opt1" type="radio" value="1" /><img src="images/i_s002.gif" width="21" height="21" />

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Just a random guess, but can radio buttons be "checked", or would it be "selected" or something else?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jun 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs down

    Hi!

    Please do not reply unless you know what you talking about.

    Cheers,DS

Bookmarks

Posting Permissions

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