469,361 Members | 2,207 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,361 developers. It's quick & easy.

problem with radio buttons

Hi,


I run the below code like i have two radio buttons. one is automatic,another is manual button.when i select the the automatic radio button it move to the page.php and select the manual radio button it move to the page2.php.But it is not work.plz tell that what's the problem in my code.


[HTML] <html>
<head>
<SCRIPT LANGUAGE="JavaScript">
function showList() {
sList = window.open("page.php", "update");
}
function show() {
sList = window.open("page2.php", "update");
}
function remLink() {
if (window.sList && window.sList.open && !window.sList.closed)
window.sList.opener = null;
}
</SCRIPT>
</head>
<body>
<form action=link method="reg_updated_msg.html" name="stockForm">
<input type="radio" name="stockBox" onClick="showList(this.value)" checked id="id11" value=""/> Automatic registration approval via
email<br>
<input type="radio" name="stockBox" onClick="show(this.value)"id="id22"/> Manual registration approval by
administrator<br>
</form>
</body>
</html>[/HTML]
Mar 31 '08 #1
2 1218
Hi,


I run the below code like i have two radio buttons. one is automatic,another is manual button.when i select the the automatic radio button it move to the page.php and select the manual radio button it move to the page2.php.But it is not work.plz tell that what's the problem in my code.


[HTML] <html>
<head>
<SCRIPT LANGUAGE="JavaScript">
function showList() {
sList = window.open("page.php", "update");
}
function show() {
sList = window.open("page2.php", "update");
}
function remLink() {
if (window.sList && window.sList.open && !window.sList.closed)
window.sList.opener = null;
}
</SCRIPT>
</head>
<body>
<form action=link method="reg_updated_msg.html" name="stockForm">
<input type="radio" name="stockBox" onClick="showList(this.value)" checked id="id11" value=""/> Automatic registration approval via
email<br>
<input type="radio" name="stockBox" onClick="show(this.value)"id="id22"/> Manual registration approval by
administrator<br>
</form>
</body>
</html>[/HTML]
I don't think there is any error in your code.
Check the location of the file that you are giving in window.open().
And what is the use of fucntion remLink() it is not used in code.
Mar 31 '08 #2
vee10
141 100+
Hi,

ur code is working but the problem is when page is loaded the automatic check box is checked so instead making it checked make is unchecked or
on loading since it is checked open that window.
Mar 31 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Claes Andersen | last post: by
15 posts views Thread by JR | last post: by
4 posts views Thread by Oscar Monteiro | last post: by
6 posts views Thread by Craig Keightley | last post: by
6 posts views Thread by Tom | last post: by
8 posts views Thread by johnmmcparland | last post: by
4 posts views Thread by Blasting Cap | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.