PDA

View Full Version : Posting a Form



NeoPuma
05-12-2005, 06:19 PM
Hey there,
I got two buttons:

<input type="Submit" name="Submit" value="Edit Page"> -
<input type="Submit" name="Preview" value="Preview Page">
As you see, they are both Submits. When they click 'Submit' I want it to go to url1 (index.php). If they click 'Preview', I want it to go to url2 (index2.php) both posting the data upon click. How could I do this?

Thanks

glenngv
05-13-2005, 03:22 AM
<input type="Submit" name="Submit" value="Edit Page" onclick="this.form.action='index.php'" /> -
<input type="Submit" name="Preview" value="Preview Page" onclick="this.form.action='index2.php'" />