473,386 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 1279
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

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

Similar topics

2
by: Claes Andersen | last post by:
Hi, I got this piece of code that i intend to use for a quiz program. What it does is the following. When a user makes a choice in a family of radio buttons, the other choices are automatically...
15
by: JR | last post by:
Hi. I hope someone out there who is more versed with JavaScript than I can help me with the following annoying problem. Here's the problem. I have a form with the following layout: Column A...
4
by: Oscar Monteiro | last post by:
I Have to sets of Radio buttons like so: <input type="radio" name=p1 value=1> <input type="radio" name=p1 value=2> <input type="radio" name=p1 value=3> <br> <input type="radio" name=p2 value=1>...
6
by: Craig Keightley | last post by:
I have a page that has n number of radio groups (yes/No) how can i prevent the form being submitted if more than one radio group is not selected? By default all radio groups are unchecked ...
2
by: James P. | last post by:
Help, I need to display radio buttons on a form. The data is from SQL table: each row in each table is displayed as a radio button. I have multiple SQL tables so I understand I need to put...
6
by: Tom | last post by:
I have a problem, to which I have been unable to find a solution for days now, after checking numerous references (both in books and online). Perhaps someone here can help. Here's my problem: ...
8
by: johnmmcparland | last post by:
Hi all, my program is trying to add group boxes with radio buttons at run time. While at one point it was able to draw the group boxes without the radio buttons, now it encounters problems just...
1
by: kenny8787 | last post by:
Hi, can anyone help here? I have the following code generated from a database, I want to have javascript calculate the costs of the selected items using radio buttons, subtotal the costs and...
4
by: Blasting Cap | last post by:
I have a page that has a number of radio buttons that will be displayed to different access levels of a user who logs in to my website. For instance, if there are a dozen buttons, user1 will see...
4
by: Z.K. | last post by:
I started a forms application and I put on the form three buttons. In the functions for the radio buttons I put in a single messagebox like: MessageBox("Hello 1") MessageBox("Hello 2") ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.