Submitting a form from another page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Simon Wigzell

    #1

    Submitting a form from another page

    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("S ubmit") 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=wi ndow.open('','M yPage','');
    windowHandle.do cument.MyForm.r emoteSubmit();

    (or I guess I could just call submit directly from the second page -
    windowHandle.do cument.MyForm.s ubmit();)

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

    Thanks!


  • shane turner

    #2
    Re: Submitting a form from another page

    "Simon Wigzell" <simonwigzell@s haw.ca> wrote in message news:<yswic.230 869$Pk3.135453@ pd7tw1no>...[color=blue]
    > 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("S ubmit") 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=wi ndow.open('','M yPage','');
    > windowHandle.do cument.MyForm.r emoteSubmit();
    >
    > (or I guess I could just call submit directly from the second page -
    > windowHandle.do cument.MyForm.s ubmit();)
    >
    > but how can I submit it and specify which submit button was "clicked"?
    >
    > Thanks![/color]

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

    Comment

    Working...