Multiple Submit Buttons

L

Lau Lei Cheong

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
 
H

Hans Kesting

Lau Lei Cheong said:
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
 
M

Martin Marinov

You can use __EVENTARGUMENT key of the Request.Form collection

Regards
Martin
 
L

Lau Lei Cheong

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
}
 
L

Lau Lei Cheong

Oh, then it won't be able to run properly under another browser such as
Netscape.

Thanks anyway. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top