469,636 Members | 1,544 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

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 1912

"Lau Lei Cheong" <le****@yehoo.com.hk> wrote in message news:%2****************@TK2MSFTNGP09.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.com.hk> wrote in message
news:#z**************@TK2MSFTNGP09.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_changed(delimethod){
document.getElementsByName("__EVENTARGUMENT") = "ib_confirm";
document.frmcardinfo.submit();
// document.getElementById('ib_confirm').click(); //was this statement,
but since it doesn't work in Netsscape I have to find another way
}

"Martin Marinov" <me********@mecrossroad.bg> 在郵件
news:O3**************@TK2MSFTNGP10.phx.gbl 中撰寫...
You can use __EVENTARGUMENT key of the Request.Form collection

Regards
Martin
"Lau Lei Cheong" <le****@yehoo.com.hk> wrote in message
news:#z**************@TK2MSFTNGP09.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.srcElement

Eliyahu

"Lau Lei Cheong" <le****@yehoo.com.hk> wrote in message
news:%2****************@TK2MSFTNGP09.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.com> 在郵件
news:%2****************@TK2MSFTNGP11.phx.gbl 中撰寫...
window.event.srcElement

Eliyahu

"Lau Lei Cheong" <le****@yehoo.com.hk> wrote in message
news:%2****************@TK2MSFTNGP09.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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Matt | last post: by
3 posts views Thread by D. Shane Fowlkes | last post: by
5 posts views Thread by Alex Maghen | last post: by
4 posts views Thread by =?Utf-8?B?YzY3NjIyOA==?= | last post: by
9 posts views Thread by mosscliffe | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.