Great!!! It works!!! TTTTThanks!!! ----- Original Message ----- From: Jim Hunter To: [EMAIL PROTECTED] ; [EMAIL PROTECTED] Sent: Tuesday, August 13, 2002 5:07 PM Subject: Re: [PHP-WIN] Form Posting from script
The solution I provided does not require Java. Java and Javascript are similar in name only. Javascript is built into the browsers that will be displaying your page. All you need to do in PHP is produce the HTML for your client to use. Part of the HTML will be a Javascript function to post the form. If you are concerned that Javascript is not active in the browser that will be viewing your page, there are hundreds of quick ways in DHTML to determine this and display a message to the user stating that your page will not function properly if Javascript is disabled. What is sometimes hard to remember is that the PHP that you are writing is not going to be seen by your user, all they see is the HTML that you produce with your PHP. Think of Javascript and HTML as one in the same (I know their not but you produce them the same using ECHO commands). Jim -------Original Message------- From: GeneralX Date: Tuesday, August 13, 2002 14:20:16 To: Jim Hunter; [EMAIL PROTECTED] Subject: Re: [PHP-WIN] Form Posting from script 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: [EMAIL PROTECTED] ; [EMAIL PROTECTED] 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: [EMAIL PROTECTED] 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>