473,666 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple Submit Buttons

Hello,

Let's say that I have multiple submit buttons on a form (imagebuttons
actually, but documentations say that <input type=image> which a called
image buttons should behave like submit buttons). How could I determine
which submit button do I invoked by calling form.submit() in javascript?

Thanks a lot.

Regards,
Lau Lei Cheong

--
If you want to mail to me, please replace all instance of "e" to "a" in my
email address. Thank you.
Sorry for any inconvience caused, but I there's many spam-mailers.

Nov 18 '05 #1
5 2110

"Lau Lei Cheong" <le****@yehoo.c om.hk> wrote in message news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hello,

Let's say that I have multiple submit buttons on a form (imagebuttons
actually, but documentations say that <input type=image> which a called
image buttons should behave like submit buttons). How could I determine
which submit button do I invoked by calling form.submit() in javascript?

Thanks a lot.

Regards,
Lau Lei Cheong


I think that if you add name and value arguments to your buttons,
the name-and-value of the button clicked will show up in the querystring.

Hans Kesting
Nov 18 '05 #2
You can use __EVENTARGUMENT key of the Request.Form collection

Regards
Martin
"Lau Lei Cheong" <le****@yehoo.c om.hk> wrote in message
news:#z******** ******@TK2MSFTN GP09.phx.gbl...
Hello,

Let's say that I have multiple submit buttons on a form (imagebuttons
actually, but documentations say that <input type=image> which a called
image buttons should behave like submit buttons). How could I determine
which submit button do I invoked by calling form.submit() in javascript?

Thanks a lot.

Regards,
Lau Lei Cheong

--
If you want to mail to me, please replace all instance of "e" to "a" in my
email address. Thank you.
Sorry for any inconvience caused, but I there's many spam-mailers.

Nov 18 '05 #3
Can you give me some example?

I tried to change the key's value but it doesn't work.

function rd_delivery_cha nged(delimethod ){
document.getEle mentsByName("__ EVENTARGUMENT") = "ib_confirm ";
document.frmcar dinfo.submit();
// document.getEle mentById('ib_co nfirm').click() ; //was this statement,
but since it doesn't work in Netsscape I have to find another way
}

"Martin Marinov" <me********@mec rossroad.bg> ¦b¶l¥ó
news:O3******** ******@TK2MSFTN GP10.phx.gbl ¤¤¼¶¼g...
You can use __EVENTARGUMENT key of the Request.Form collection

Regards
Martin
"Lau Lei Cheong" <le****@yehoo.c om.hk> wrote in message
news:#z******** ******@TK2MSFTN GP09.phx.gbl...
Hello,

Let's say that I have multiple submit buttons on a form (imagebuttons actually, but documentations say that <input type=image> which a called
image buttons should behave like submit buttons). How could I determine
which submit button do I invoked by calling form.submit() in javascript?

Thanks a lot.

Regards,
Lau Lei Cheong

--
If you want to mail to me, please replace all instance of "e" to "a" in my email address. Thank you.
Sorry for any inconvience caused, but I there's many spam-mailers.


Nov 18 '05 #4
window.event.sr cElement

Eliyahu

"Lau Lei Cheong" <le****@yehoo.c om.hk> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hello,

Let's say that I have multiple submit buttons on a form (imagebuttons
actually, but documentations say that <input type=image> which a called
image buttons should behave like submit buttons). How could I determine
which submit button do I invoked by calling form.submit() in javascript?

Thanks a lot.

Regards,
Lau Lei Cheong

--
If you want to mail to me, please replace all instance of "e" to "a" in my
email address. Thank you.
Sorry for any inconvience caused, but I there's many spam-mailers.

Nov 18 '05 #5
Oh, then it won't be able to run properly under another browser such as
Netscape.

Thanks anyway. :)

"Eliyahu Goldin" <re************ *@monarchmed.co m> ¦b¶l¥ó
news:%2******** ********@TK2MSF TNGP11.phx.gbl ¤¤¼¶¼g...
window.event.sr cElement

Eliyahu

"Lau Lei Cheong" <le****@yehoo.c om.hk> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Hello,

Let's say that I have multiple submit buttons on a form (imagebuttons actually, but documentations say that <input type=image> which a called
image buttons should behave like submit buttons). How could I determine
which submit button do I invoked by calling form.submit() in javascript?

Thanks a lot.

Regards,
Lau Lei Cheong

--
If you want to mail to me, please replace all instance of "e" to "a" in my email address. Thank you.
Sorry for any inconvience caused, but I there's many spam-mailers.


Nov 18 '05 #6

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

Similar topics

2
2099
by: Matt | last post by:
The ASP page has multiple buttons, and when the user clicks different buttons, it will submit the form data to different URLs. My first approach was to use BUTTON type, and triggers javascript function to submit the form data. However, it didn't work properly and I changed to use SUBMIT type. <INPUT TYPE="BUTTON" NAME="action1" VALUE="Return to Main Search Page" onClick="action1()">
3
2559
by: D. Shane Fowlkes | last post by:
Sorry for the length of this post. I have created a rather complex form which has a header/line item (parent and child records) structure. It's for an intranet. A screenshot can be seen here: http://www.drpt.virginia.gov/temp1.gif All the fields on this form have validation controls on them so they can not submit the form unless all fields are completed and some fall within a specified numeric range. When the form first is loaded,...
1
2732
by: Bill_W_Stephens | last post by:
I have a complicated page with several submit buttons. I don't want to create multiple forms because much of the input is shared and the code is getting very ugly. However I would like to determine which values will be submited. Here is a simplified example that may better illustrate my question. Or maybe there is a better approach... <SCRIPT language="JavaScript">
5
20010
by: Alex Maghen | last post by:
In ASPX 2.0 with MasterPages and all that, my entire page only has one actual <FORM>. But there are several different sections of the page that provide what are functionally separate forms with separate Submit buttons. In basic HTML, I can have multiple forms on a page and the browser knows that if any of the fields for Form A have the focus, then pressing ENTER will send a Click to the submit button for Form A. Same for Form B, etc. ...
5
2450
by: mayur_hirpara | last post by:
Hi, I have been developing web applications for a while now. However, as I was thinking through the architecture I really don't understand the "How server can identify between which buttons has made the postback request.???" for e.g. I have a webpage default.aspx. I place TWO or more server buttons on it. Create server-side event handlers for each of the buttons.
5
14119
by: c676228 | last post by:
Hi everyone, my colleagues are thinking about have three insurance plans on one asp page: I simplify the plan as follow: text box:number of people plan1 plan2 plan3
4
6668
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all I have the following code: I am trying to use the value of the image button to evaluate what plan the user has chosen, i.e. it request("submit1")="Basic", then the user chose basic plan ... But when I click one of the image button, the thing is different from what I thought. it seems that it has field name like submit1.x=24&submit1.y=10, looks like the form submit swith the image button position values instead of the value
9
4265
by: mosscliffe | last post by:
I am struggling to find a python example of the scenario - I have. I have a python script, which generates a page with a search button (actually an input field). The data from the above submissions is interrogated and the same script produces a new search option and the a page of results from the previous search request. - as done by Google's Main search page. The user then has the option of a new search or navigating to a
3
4012
by: printline | last post by:
Hello All I have a form with multiple submit buttons, where i would like to open in a new window when hitting one of the submit buttons. Can't seem to figure this out according to the code i'm using. Could someone perhaps tell me what to do...??? Here is the code i'm using: <SCRIPT> function submitFunction(i) { if (i==1) document.shopform.action="http://www.printline.dk/webshop/upload.php"; if (i==2)...
0
8356
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8871
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...
0
8783
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8552
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
8640
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5666
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();...
1
2773
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
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1776
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.