Re: Form Posting from script
| From: | GeneralX | Date: | Tue, 13 Aug 2002 21:15:29 +0000 |
| Subject: | Re: Form Posting from script | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-15237@lists.php.net to get a copy of this message | ||
Once a user has submitted all info, my action page confirms the inputs then sends out confirmation
email and to the CGI requiring the info for processing.
Problem is that I can't get the Java to work with PHP4.
I don't have JDK.
php.ini
----------
extension=php_java.dll
[Java]
java.class.path = .\java\php_java.jar
;java.home = c:\jdk
;java.library = c:\jdk\jre\bin\hotspot\jvm.dll
;java.library.path = .\
----- Original Message -----
From: Jim Hunter
To: php-windows@lists.php.net ; mbsisot@sbcglobal.net
Sent: Tuesday, August 13, 2002 2:51 PM
Subject: Re: [PHP-WIN] Form Posting from script
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>