Welcome to WebmasterWorld Guest from 23.20.137.66

Forum Moderators: incrediBILL

Message Too Old, No Replies

Multiple Form Action Attributes

is it possible to make a form perform 2 actions?

     
12:35 pm on Jul 19, 2001 (gmt 0)

10+ Year Member



It would be handy if I could make a form execute two actions.

Is this possible?

stavs.

12:48 pm on Jul 19, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yes ;)
3:07 pm on Jul 19, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



how?
3:13 pm on Jul 19, 2001 (gmt 0)

10+ Year Member



Surely not possible without resorting to javascript or some form of black magic involving sacrificing a copy of Frontpage 2000?
3:14 pm on Jul 19, 2001 (gmt 0)

WebmasterWorld Senior Member agerhart is a WebmasterWorld Top Contributor of All Time 10+ Year Member



what about with ASP?......it has to be possible
3:31 pm on Jul 19, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can do it using javascript either on onsubmit calling a function etc
5:21 pm on Jul 19, 2001 (gmt 0)

10+ Year Member



Wouldn't it depend upon the actions? I think more info is needed here. Sending a request to some dynamicly processed page (such as ASP or PHP) could allow for many actions. I guess my question would be, "What two actions would you like to perform?" :)
6:23 pm on Jul 19, 2001 (gmt 0)

10+ Year Member



action 1 - anyform.cgi

action 2 - activate an auto responder

the anyform script is excellent for our needs but does not provide for auto responders. Hence the need for two actions on the submission of the form.

11:49 pm on Jul 21, 2001 (gmt 0)

10+ Year Member



Here's an idea.

This goes in a SCRIPT element:

function mySubmit() {
  if (data_validates) {
    runAutoResponder();
    // form will be submitted
  }
  else {
    return false; // don't allow submit
  }
}

This goes in the BODY element:

<form name='form1' action='anyform.cgi' method='post' onsubmit='mySubmit()'>

 

Featured Threads

Hot Threads This Week

Hot Threads This Month