Re: Form Problem w/multiple forms same page.
| From: | Ryan Adams | Date: | Tue, 11 Jul 2000 21:35:59 +0000 |
| Subject: | Re: Form Problem w/multiple forms same page. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-6015@lists.php.net to get a copy of this message | ||
One handy thing that I've found is to cause different submit buttons to
submit to different pages/windows using javascript. You can have just one
form then, and all the data will go with any submission...
ex.
<head>
<script type="JavaScript">
<!--
function submit_one () {
myform.action="file1.php";
myform.target="";
myform.submit;
}
function submit_two () {
myform.action="file2.php";
myform.target="_blank";
myform.submit;
}
-->
</script>
<form name=myform>
<input type=text name=blah>
<input type=submit onClick="submit_one();" name=something value='One'>
<input type=submit onClick="submit_two();" name=somethingelse value='Two'>
</form>
hope this helps,
Ryan
On Mon, Jul 10, 2000 at 11:39:33PM -0400, Kenneth Bogucki wrote:
>
> I have a simple and a complex search form on the same page, however the
> user has the option of selecting any number of different databases to
> perform these searches...in addition, I can only use one drop down menu
> for database selection.
>
> Any ideas on how to use one drop down menu for the database selection
> where the selection is shared by either the simple search form or the
> complex search form.
>
>
> ken
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
---end quoted text---