Hello all, I have a problem to create a form's cancel button. It will be appreciable if anybody help me.
The code is about the cancel button, im actully making a form which has a cancel button. If the button is pressed it will redirect in another page.
|
Go4Expert Founder
|
![]() |
| 11Jan2009,11:01 | #2 |
|
Write the code in the OnClick Event to redirect the page to other url. Something similar to the Go Advanced button in the quick reply
|
|
Contributor
|
|
| 3Feb2009,11:16 | #3 |
|
Hope that links will help you............
http://www.useit.com/alertbox/20000416.html http://devedge-temp.mozilla.org/libr...de/tags10.html |
|
Light Poster
|
|
| 25Feb2009,12:05 | #4 |
|
I am not sure about this But you should try it yourself..perhaps it works correctly..Good luck.
Code:
object.Cancel |
|
Go4Expert Member
|
|
| 11May2009,10:58 | #5 |
|
Below is a code help for you:-
Code:
<script>
function $(id) { return document.getElementById(id); }
</script>
<form action="...php" id="frm">
[CODE here]
<input type="submit" value="Submit form">
<button onclick="$('frm').action='otherPage.php';$('frm').submit();">Cancel</button>
[CODE here]
</form>
Akshit Soota |
|
Newbie Member
|
|
| 5Aug2009,03:09 | #6 |
|
<input type="button" name="Cancel" value="Cancel" onclick="window.location = 'yourpage.html' " />
|
|
Newbie Member
|
|
| 24Nov2010,13:02 | #7 |
|
<a href="url.html"><input type="button" name="cancel" value="Cancel" /></a>
This ones particularly nice because it only depends on html |
|
Newbie Member
|
|
| 19Dec2012,22:56 | #8 |
|
GreatGizzards, thank you!
works perfectly and I also wanted to mention that I needed to re-direct to a php file to instead of url.html, I entered home.php and bingo, it worked. |

