Re: POST variables from a link...and popup new window
| From: | emre at vt dot com dot tr | Date: | Fri, 01 Apr 2005 17:16:59 +0000 |
| Subject: | Re: POST variables from a link...and popup new window | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-212042@lists.php.net to get a copy of this message | ||
<?php
echo '
<form name=FormToBeSubmitted action=targetpage.php method=post>
</form>
<script language=javascript>
document.FormToBeSubmitted.submit();
</script>
';
?>
you can also set some variables to your form,
for example in the script body put this code to submit a form variable named
'testvariable'
//first define the value somewhere before the <script> tags,
$stringstr=' this is gonna be submitted also'
then between <script> tags put this string below:
document.getElementById('testvariable').value=$submitstr;
if you need a adynamic value to be subbmitted than just change var
hope it helps,
----- Original Message ----- From: "Richard Lynch" <ceo@l-i-e.com>
To: "james tu" <jtu@esidesign.com>
Cc: <php-general@lists.php.net>
Sent: Wednesday, March 30, 2005 12:34 AM
Subject: Re: [PHP] POST variables from a link...and popup new window
On Tue, March 29, 2005 1:09 pm, james tu said:I have a link that, when clicked on, pops up a new window. I want to use the POST method in order to pass information. Right now I'm appending the parameters to the URL of the link and using GET to retrieve the name/value pairs.<form target="_blank" ... > You may be able to use onSubmit or something similar to make the new window be the size/look you want with JavaScript. There's no PHP involved here, though, so maybe ask on an HTML and/or JavaScript forum for better answers. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php