Change form location depending on submit button?
Hey guys,
I hate using Javascript for this kind of stuff but I can't think of a simple solution without client side technology. Basically, I'm working on a form that after it's filled in has two options. One to generate a preview and the other to submit the details (similar to the post page on this forum actually!).
I was wondering if it's easy to change the form location depending on which of the two buttons at the bottom is pressed and if so how I would go about doing it?
Thanks for the help guys!
Andy
pr0gr4mm3r posted this at 23:50 — 30th April 2007.
He has: 1,502 posts
Joined: Sep 2006
<input type="submit" onClick="document.form1.action='http://www.somewhere.com';">
That should do it.
andy206uk posted this at 19:53 — 1st May 2007.
He has: 1,758 posts
Joined: Jul 2002
Thanks! That worked a treat = I've really got to learn Javascript... it's one of those things I've always avoided!
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.