Re: automatic pop-up when click on radio button
by "Jens Brueckmann" <lists(at)j-a-b.net>
|
Date: |
Tue, 08 Jun 2004 23:25:29 +0200 |
To: |
susanfriesen(at)telus.net, "hwg-techniques(at)hwg.org" <hwg-techniques(at)hwg.org> |
References: |
telus |
|
todo: View
Thread,
Original
|
|
Hi Susan,
> I'd like to have a popup window automatically appear when a user clicks
> on
> the "yes" option for a radio button. So far, I've got it to work with the
> code below; however, the "yes" does not indicate it has been checked.
> The no
> does "uncheck" though. Any suggestions?
the disappearance of the "checked" mark in the yes button is caused by
your JavaScript code.
If you delete "return false" from this script, your radio buttons work as
intended.
> <.input type="radio" name="sponsor"
> onClick="MyWindow=window.open('sponsors.php','MyWindow','toolbar=no,location
> =no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=3
> 80,height=480'); return false;" value="0"/>Yes<input type="radio"
> name="sponsor" value="0" checked />No
You should also be aware that your markup is neither HTML nor XHTML.
If you would like to use XHTML you must observe the following two rules:
1. all event handlers are lowercase - do not use onClick but onclick
2. attribute names are required - do not use checked but
checked="checked"
Best regards
jens
<|8>))
--
Jens Brueckmann
http://www.j-a-b.net/
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA