HTML / Forms / etc
#1
Scooby Regular
Thread Starter
Join Date: Apr 2002
Location: Birmingham
Posts: 9,196
Likes: 0
Received 0 Likes
on
0 Posts
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
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
#2
Yup, just use a "button" button rather than a "submit" button and put a bit of javascript on it ie:
HTH
J
Code:
<input type="button" onClick="location.href='moo.htm'" name="Back" value="Back">
J
#3
Scooby Regular
Join Date: Oct 2003
Location: Cheshire
Posts: 671
Likes: 0
Received 0 Likes
on
0 Posts
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
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
Thread
Thread Starter
Forum
Replies
Last Post
shorty87
Full Cars Breaking For Spares
19
22 December 2015 11:59 AM
Pro-Line Motorsport
Car Parts For Sale
2
29 September 2015 07:36 PM
shorty87
Wheels And Tyres For Sale
0
29 September 2015 02:18 PM