Re: Form Posting from script

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: Form Posting from script
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-15234@lists.php.net to get a copy of this message
You have answered your own question. It doesn't get any simpler than a submit from Javascript. Now the question you need to think about is when do you want the post to occur? Are you going to have then press a link? After the page loads? After the last piece of data is entered? When you know where it should occur then just call a Javascript function that issues the submit() of the form. Jim function postForm() { document.forms[0].submit(); } -------Original Message------- From: GeneralX Date: Tuesday, August 13, 2002 12:40:45 To: php-windows@lists.php.net Subject: [PHP-WIN] Form Posting from script How do you post a form without actually waiting for submit button to be pressed? Got a CGI expecting a form post, all the fields are already available as hidden type in a form, and just need to be send it. I know you can use Java as such: <form method="post" action="CGI.php"> <input type="hidden" name="FName" value="myFirstName"> </form> <script type="text/javascript"> document.forms[0].submit(); </script>

« previous php.windows (#15234) next »