473,508 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

without pressing any buttons???

Hi,

I have a page with 4 radiobuttons on it and no buttons on it. I want
to post the value of the selected radio button to the other page
without pressing any buttons (with only selecting the radio button)
How can I accomplish this??? I made a code block like below but
couldn't make it work???

Thank you,
Cem Louis

<html>
<head>
</head>
<SCRIPT LANGUAGE="Javascript">
function Submit(){
document.getElementById("form1").Submit()
}
</SCRIPT>
<form name="form1" method="post" action="process.php">
<input name="radiobutton" type="radio" value="radiobutton"
onClick="Submit()">Apple<br>
<input name="radiobutton" type="radio" value="radiobutton"
onClick="Submit()">Banana<br>
<input name="radiobutton" type="radio" value="radiobutton"
onClick="Submit()">Peach<br>
<input name="radiobutton" type="radio" value="radiobutton"
onClick="Submit()">Melon
</form>
Jul 23 '05 #1
2 1553
"Cem Louis" <ce******@phreaker.net> wrote in message
news:12**************************@posting.google.c om...
Hi,

I have a page with 4 radiobuttons on it and no buttons on it. I want
to post the value of the selected radio button to the other page
without pressing any buttons (with only selecting the radio button)
How can I accomplish this??? I made a code block like below but
couldn't make it work???

Thank you,
Cem Louis

<html>
<head>
</head>
<SCRIPT LANGUAGE="Javascript">
function Submit(){
document.getElementById("form1").Submit()
}
</SCRIPT>
<form name="form1" method="post" action="process.php">
<input name="radiobutton" type="radio" value="radiobutton"
onClick="Submit()">Apple<br>
<input name="radiobutton" type="radio" value="radiobutton"
onClick="Submit()">Banana<br>
<input name="radiobutton" type="radio" value="radiobutton"
onClick="Submit()">Peach<br>
<input name="radiobutton" type="radio" value="radiobutton"
onClick="Submit()">Melon
</form>


Try lowercase "s" for ".submit()".
Jul 23 '05 #2
Ivo
"McKirahan" wrote
"Cem Louis" wrote
<input name="radiobutton" type="radio" value="radiobutton"
onClick="Submit()">Melon
</form>


Try lowercase "s" for ".submit()".


And just for the sake of completeness and crossbrowserness, you might
as well write it in full:

onclick=" this.form.submit(); "

--
Ivo


Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2003
by: VK | last post by:
A while ago there was a discussion how to implement a select list that would call a function right upon new selection is being made w/o clicking any additional buttons: ...
3
1443
by: Dan Brussee | last post by:
I have a form with 2 or more buttons. How do I control which one will fire when I press the Enter key? In traditional ASP, I could create 2 or more forms, each with their own Submit buttons. Since...
2
7150
by: Cindy | last post by:
Hi all you smarties out there, I'm having a little conundrum with my asp.net page Scenario: I have a form (asp.net) with no code behind (as yet). I have placed a javascript function on a...
2
1684
by: Ersin Gençtürk | last post by:
I show errors as popup boxes via alert() but I write this scripts in header of html page.So if there is an error on the server side , in the next postback a popup shows the error via alert , this...
1
1523
by: George Homorozeanu | last post by:
Hi, I have an ASP.Net Page with some control on it (buttons, textboxes, calender, etc). When I'm changing the text in the textbox I want to run some code and change the date of the calendar. The...
2
5338
by: Asterbing | last post by:
Hi all. I'm trying and don't succeed to include an HTML page into another without any border nor visible scroll-bar. Even if I would like something which will work under Netscape too, at this...
1
2477
by: GlennMBella2 | last post by:
this is probably basic, however I ahve a form with number of buttons and upon pressing certain buttons as part of hte buttons press function, i would like to update a table (communications) with...
18
3923
by: Shocky | last post by:
Hi there, I am trying to detect whether my IE6 users have pressed both right and left mouse buttons simultaneously in my Javascript code, by using: if(event.button==3) {alert("Both right and...
0
950
by: John Sheppard | last post by:
Hello there, I was wondering if anyone knew how to close a form when the user presses the esc key. I dont have any buttons on the form so I cannot use the cancelButton property of the form. I...
0
7226
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,...
1
7049
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...
0
7499
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5631
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,...
0
4709
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...
0
3186
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1561
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 ...
1
767
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
422
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.