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.
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
Hope that links will help you............ http://www.useit.com/alertbox/20000416.html http://devedge-temp.mozilla.org/library/manuals/1998/htmlguide/tags10.html
I am not sure about this But you should try it yourself..perhaps it works correctly..Good luck. Code: [FONT=monospace] [/FONT]object.Cancel
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> Regards, Akshit Soota
<a href="url.html"><input type="button" name="cancel" value="Cancel" /></a> This ones particularly nice because it only depends on html
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.