473,804 Members | 3,353 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with radio buttons

4 New Member
Hi,


I run the below code like i have two radio buttons. one is automatic,anoth er 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="JavaS cript">
function showList() {
sList = window.open("pa ge.php", "update");
}
function show() {
sList = window.open("pa ge2.php", "update");
}
function remLink() {
if (window.sList && window.sList.op en && !window.sList.c losed)
window.sList.op ener = null;
}
</SCRIPT>
</head>
<body>
<form action=link method="reg_upd ated_msg.html" name="stockForm ">
<input type="radio" name="stockBox" onClick="showLi st(this.value)" checked id="id11" value=""/> Automatic registration approval via
email<br>
<input type="radio" name="stockBox" onClick="show(t his.value)"id=" id22"/> Manual registration approval by
administrator<b r>
</form>
</body>
</html>[/HTML]
Mar 31 '08 #1
2 1292
abhishekbrave
79 New Member
Hi,


I run the below code like i have two radio buttons. one is automatic,anoth er 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="JavaS cript">
function showList() {
sList = window.open("pa ge.php", "update");
}
function show() {
sList = window.open("pa ge2.php", "update");
}
function remLink() {
if (window.sList && window.sList.op en && !window.sList.c losed)
window.sList.op ener = null;
}
</SCRIPT>
</head>
<body>
<form action=link method="reg_upd ated_msg.html" name="stockForm ">
<input type="radio" name="stockBox" onClick="showLi st(this.value)" checked id="id11" value=""/> Automatic registration approval via
email<br>
<input type="radio" name="stockBox" onClick="show(t his.value)"id=" id22"/> Manual registration approval by
administrator<b r>
</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 New Member
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
1778
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 disabled, hence allowing a "first answer counts" system. It works fine with just one family on a page, but I need it to work with more ... The function is called from the respective radio buttons like this: <input onclick="lockChoice(1,0);"...
15
2562
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 Column B Column C data 4 radio buttons more data .... ... ... .... ... ...
4
3284
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> <input type="radio" name=p2 value=2> <input type="radio" name=p2 value=3> then a text area and a button:
6
3296
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 The problem i am facing is that i do not know how many yes/no radio groups will be generated
2
11987
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 them each in a GroupBox. All the examples I saw from the books or from the web show me how to add static radio buttons at design, or dynamically at run time but with fixed radio buttons (like from an array). I need to create radio buttons based...
6
1558
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: I'm trying to define a series of radio objects as a large array for a survey, like this: 1) Does this make sense? <input type="radio" name="question" value="Y"> Yes <input type="radio" name="question" value="N"> No
8
2937
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 getting the radiobuttons out of the group box. /// area where radio buttons added to groupbox /// this code is wrapped in another loop creating group boxes
1
6895
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 grandtotal the costs ready for the selected items to be inserted back to the database. I did something like this before with Checkboxes, but Radio button have to be named the same to maintain their groupings.
4
2524
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 all twelve. User2 would see buttons 1-3,10-12 and NOT any others, and so on. Since there are several buttons on the page (each one would run a report for them), is there a way to - in an onclick event for each of the buttons - to...
4
3093
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") MessageBox("Hello 3")
0
9711
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10594
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10331
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9166
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4306
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.