Submitting a form from another page

S

Simon Wigzell

I have a form with several different submit buttons that does different
thinkgs depending which button is clicked. (All the submit buttons are named
"Submit" and my form uses the asp request.form("Submit") to get the value of
the button clicked)

I would like another page to not only submit the form on this page - I can
do that by having a function:

window.name = "MyPage:

function remoteSubmit()
{
document.MyForm.submit();
}

and then in the second page I can do this:

windowHandle=window.open('','MyPage','');
windowHandle.document.MyForm.remoteSubmit();

(or I guess I could just call submit directly from the second page -
windowHandle.document.MyForm.submit();)

but how can I submit it and specify which submit button was "clicked"?

Thanks!
 
S

shane turner

Simon Wigzell said:
I have a form with several different submit buttons that does different
thinkgs depending which button is clicked. (All the submit buttons are named
"Submit" and my form uses the asp request.form("Submit") to get the value of
the button clicked)

I would like another page to not only submit the form on this page - I can
do that by having a function:

window.name = "MyPage:

function remoteSubmit()
{
document.MyForm.submit();
}

and then in the second page I can do this:

windowHandle=window.open('','MyPage','');
windowHandle.document.MyForm.remoteSubmit();

(or I guess I could just call submit directly from the second page -
windowHandle.document.MyForm.submit();)

but how can I submit it and specify which submit button was "clicked"?

Thanks!

I don't think you can unless you refer to the window it came from.
 

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

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top