ScoobyNet.com - Subaru Enthusiast Forum

ScoobyNet.com - Subaru Enthusiast Forum (https://www.scoobynet.com/)
-   Computer & Technology Related (https://www.scoobynet.com/computer-and-technology-related-34/)
-   -   HTML / Forms / etc (https://www.scoobynet.com/computer-and-technology-related-34/312535-html-forms-etc.html)

SiDHEaD 22 March 2004 11:42 AM

HTML / Forms / etc
 
Hi,

I have a button on a form which is submit. This passes the form onto the next page for processing (PHP). Can i have a button on the same form which goes to a different URL (not a submit, just returns to home for example (cancel)).


Andy

judgejules 22 March 2004 11:59 AM

Yup, just use a "button" button rather than a "submit" button and put a bit of javascript on it ie:

Code:

<input type="button" onClick="location.href='moo.htm'" name="Back" value="Back">
HTH

J

NWMark 22 March 2004 12:01 PM

you sure can just give it a type=button and assign some onclick code so that it loads which ever page you like.
e.g
<INPUT type="button" value="Click Here" onclick='window.location.href="homepage.asp"'>

or you can have another form and have a submit button and have the form target equal the page you want to go to.

Mark

SiDHEaD 22 March 2004 12:05 PM

Cheers!!! easy when you know how, huh


Andy


All times are GMT +1. The time now is 06:29 AM.


© 2024 MH Sub I, LLC dba Internet Brands