CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

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



Feb 20, 2001, 2:49 AM

Post #1 of 2 (5086 views)
How to execute multiple cgi's from one html form Can't Post

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

Post #2 of 2 (5080 views)
Re: How to execute multiple cgi's from one html form [In reply to] Can't Post


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?


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives