Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms, posting to cgi scripts (1of 2 scripts) 1

Status
Not open for further replies.

carlosAlberto

IS-IT--Management
Oct 9, 2001
109
GB
hi,

I have two cgi script set up. Depending on the data that is recieved from user one or the other is called (never both called).

I can only define 1 in the <form method=post action='' name=form>

Is this possible to set up?? If not any ideas or a work around.

Thanks.
 
You can use JavaScript to reset the action parm in the form tag. Would look something like this.
Code:
function checkForm() {
  if(document.formname.gender.value == &quot;female&quot;) {
    document.formname.action = &quot;girlspage.htm&quot;
  } elseif(document.formname.gender.value == &quot;male&quot;) {
    document.formname.action = &quot;machoman.htm&quot;
  }
  return true
}

ToddWW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top