Re: Newbie help with form buttons pls.



Many thanks Randy
Nice, simple, solution
Cheers

"Randy Webb" <HikksNotAtHome@xxxxxxx> wrote in message
news:Kc2dnbOzE8Z_b67b4p2dnA@xxxxxxxxxxxxxxx
Richard said the following on 4/28/2007 8:46 PM:
Hi all.

I need to put three different submit buttons on an HTML form.
(No form verification prior to submit needed at this stage)

Button 1. Submit (and go to url xxx)

<input type="button"
onclick="this.form.action='URLXXX';this.form.submit()"
value="Submit Button 1">

Button 2. Submit (and go to url yyy)

<input type="button"
onclick="this.form.action='URLYYY';this.form.submit()"
value="Submit Button 2">

Button 2. Submit (and return to this form page for new data entry)

<input type="button"
onclick="this.form.action=window.location.href;this.form.submit()"
value="Submit Button 3">

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/


.


Quantcast