Hi team,
I'm very new to javascript but I have an urgent requirement to be able to add a "Cancel" button next to a "Save" button on a form I'm building. The form itself is in PHP but the template allows us to insert javascript code there. I have a small snippet below and I just need a way so that next to the "Save" button will be a "Cancel" button where if the user clicks it, it aborts the form data entry and goes back to the previous page, as though the user pressed the "back" button on his/her browser.
Thanks very much for all the help.
I'm very new to javascript but I have an urgent requirement to be able to add a "Cancel" button next to a "Save" button on a form I'm building. The form itself is in PHP but the template allows us to insert javascript code there. I have a small snippet below and I just need a way so that next to the "Save" button will be a "Cancel" button where if the user clicks it, it aborts the form data entry and goes back to the previous page, as though the user pressed the "back" button on his/her browser.
Thanks very much for all the help.
Code:
<!--<fieldset><legend></legend>-->
<table><tr><td> <input name="--session:save" value="Save" type="submit" />
</td><td> </td></tr></table>
<!--</fieldset>-->
</div>
<div class="formHelp"></div>
</div>
</td>
</tr>
</table></div>
</form>