Two form actions

A

Alex Vinokur

Here is some HTML code.

----------------------------------
<form action="/tmp/xxx">
email-1: <input type=text name=email>
<input type=submit name="sub" value="Subscribe-1">
<form action="/tmp/yyy">
<BR>
email-2: <input type=text name=email>
<input type=submit name="sub" value="Subscribe-2">
</form>
</form>
----------------------------------

If email-1 is subscribed then action "/tmp/xxx" is invoked. It is OK.
But if email-2 is subscribed then action "/tmp/xxx" is invoked too. Why?

I would like action "/tmp/yyy" to be invoked if email-2 is subscribed.
Any suggestions?

Thanks,
 
J

Jukka K. Korpela

Alex Vinokur said:
Here is some HTML code.

It's invalid. Forms must not be nested, by HTML syntax.
I would like action "/tmp/yyy" to be invoked if email-2 is subscribed.

I have no idea of what you mean by email-2 being subscribed. Maybe that the
input field is not empty? Anyway, the proper way is to use an action
attribute that refers to a server-side script that can handle any data in
the desired way - such as send data to two addresses.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top