Home: General Discussions: General Questions:
How to execute multiple cgi's from one html form


Feb 20, 2001, 2:49 AM

Views: 5085
How to execute multiple cgi's from one html form

Hello. I recently downloaded a basic search script from this archive. The script can index/search through all files in a directory. Now I want to implement a search form that gives the user the option to search through either the entire site or just a single directory. The search script itself does not give me this option. My question is: 1) Is it possible to execute more than one cgi from a single html form (doesn't seem logical to me) and 2) Is there a search script that does have the option to limit the search to a single directory or just search through an entire site. Any help appreciated!


Feb 22, 2001, 10:24 PM

Views: 5079
Re: How to execute multiple cgi's from one html form


Here is a javascript trick that will get you multiple actions for the same form...

<form method="POST" action="display.cgi" name="memberform"> 

<input type="submit" name="editmembers" value="Edit"
onclick="forms.memberform.action = 'edit.cgi';">

<input type="submit" name="editmembers" value="Blast"
onclick="forms.memberform.action = 'blast.cgi';">

If you do this you might want to make sure the default action (display.cgi in this example) can figure out what
to do if the user has javascript turned off and all buttons do the default action.

Sun Sep 9, 2001 - 1:46:40 GMT, a very special second in the epoch. How will you celebrate?