-
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" />
-
-
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
-
-
Hi!
Please do not reply unless you know what you talking about.
Cheers,DS
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks