submit the form data to the popup window without a submit button

Discussion in 'Javascript' started by jrefactors@hotmail.com, Jan 1, 2005.

  1. Guest

    The following will submit the form data to popup by clicking the submit
    button. I want it will submit the form automatically to the popup,
    there is no submit button in this page.
    Basically this page should not show up. Any ideas?? thanks!!

    <script type="text/javascript">
    function submitmyform(f) {
    f.target = 'foo';
    window.open('',f.target,'menubar=no,scrollbars=no,width=800,height=800');
    f.submit();
    return false;
    }
    </script>

    <form name="myform" action="popup.asp" target="_blank" method="post"
    onsubmit="return submitmyform(this);">
    <input type="hidden" name="item" value="item"/>
    <input type="submit" value="submit to popup"/>
    </form>
     
    , Jan 1, 2005
    #1
    1. Advertising

  2. Noozer Guest

    <> wrote in message
    news:...
    > The following will submit the form data to popup by clicking the submit
    > button.


    No it won't... The popup will never open.
     
    Noozer, Jan 1, 2005
    #2
    1. Advertising

  3. rf Guest

    <> wrote

    > The following will submit the form data to popup


    You don't want to do that either.

    --
    Cheers
    Richard.
     
    rf, Jan 1, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt Jensen
    Replies:
    1
    Views:
    5,262
    Matt Jensen
    Dec 16, 2005
  2. Replies:
    2
    Views:
    6,325
  3. Neil
    Replies:
    6
    Views:
    39,724
    atilio123321
    Sep 2, 2011
  4. Jens Peter Hansen
    Replies:
    7
    Views:
    577
    Randy Webb
    Jun 19, 2004
  5. Raffi
    Replies:
    4
    Views:
    248
    Dr John Stockton
    Aug 12, 2004
Loading...

Share This Page