1 form 2 actions

They have: 314 posts

Joined: Nov 1999

Is it possible to have ne form but for it to perform two actions? I would like to say have a signup form for a members area which, when the user presses submit will add the email address they inputted into my mailing list and send the rest of the details to whereever. The example is not real but i would like to know if you can have one form and two actions

------------------
Thomas Minton
The JavaScript Place
Get paid $20 - $160 for viewing adverts

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi Minton,

I've never personally tried it, but if you declare your submit button type=button and then call a function with onclick...
something like:
<input type=button onclick=submit2()

function submit2()
email2me()
document.form.submit()

seems like it should work. Try it, and see. cpu time is cheap.

Vinny GrassBlade:cut&paste javascript

Where the world once stood
the blades of grass cut me still

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.