Automatic postback for a form?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fred Geurtsen

    Automatic postback for a form?

    Hi,

    My question is how I can send a form without having to push on a submit
    button? I need to send a form with method post just by loading the hidden
    textboxes and send them right away. Anyone got the anser?

    Thx


  • Evertjan.

    #2
    Re: Automatic postback for a form?

    Fred Geurtsen wrote on 15 dec 2004 in comp.lang.javas cript:
    [color=blue]
    > My question is how I can send a form without having to push on a
    > submit button? I need to send a form with method post just by loading
    > the hidden textboxes and send them right away. Anyone got the anser?
    >[/color]

    document.forms. myForm.submit()

    Dat had je ook wel op kunnen zoeken!


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    • Fred Geurtsen

      #3
      Re: Automatic postback for a form?

      Dank je Evertjan...dit gaat toch veel sneller zo!

      "Evertjan." <exjxw.hannivoo rt@interxnl.net > wrote in message
      news:Xns95C0695 DE7E16eejj99@19 4.109.133.29...[color=blue]
      > Fred Geurtsen wrote on 15 dec 2004 in comp.lang.javas cript:
      >[color=green]
      >> My question is how I can send a form without having to push on a
      >> submit button? I need to send a form with method post just by loading
      >> the hidden textboxes and send them right away. Anyone got the anser?
      >>[/color]
      >
      > document.forms. myForm.submit()
      >
      > Dat had je ook wel op kunnen zoeken!
      >
      >
      > --
      > Evertjan.
      > The Netherlands.
      > (Please change the x'es to dots in my emailaddress)[/color]


      Comment

      • Grant Wagner

        #4
        Re: Automatic postback for a form?

        "Fred Geurtsen" <f.geurtsen@sim stones.nl> wrote in message
        news:41c0011e$0 $151$3a628fcd@r eader2.nntp.hcc net.nl...[color=blue]
        > Hi,
        >
        > My question is how I can send a form without having to push on a[/color]
        submit[color=blue]
        > button? I need to send a form with method post just by loading the[/color]
        hidden[color=blue]
        > textboxes and send them right away. Anyone got the anser?[/color]

        <head>
        <script type="text/javascript">
        window.onload = function() {
        document.forms['myForm'].submit();
        }
        </script>
        </head>
        <body>
        <form name="myForm">

        or

        <body onload="documen t.forms['myForm'].submit();">
        <form name="myForm">

        Most user agents will present the user with a prompt asking them if they
        really want to submit the form. No, there is no way to get around that.

        --
        Grant Wagner <gwagner@agrico reunited.com>
        comp.lang.javas cript FAQ - http://jibbering.com/faq


        Comment

        Working...