posted 18 years ago
Hi,
I have 2 buttons, one to save a page and one to cancel it.
When I hit the cancel button it should perform the "cancel" action but instead it does the action related to the save button
This is my code:
<input type="image" src="../images/button_save.gif" alt="save" title="Save taxonomy" accesskey="S"/>
<input type="image" src="../images/button_cancel.gif" alt="cancel" title="Cancel New Taxonomy" accesskey="C" oncclick="cancel()">
<script language="JavaScript">
function cancel()
{
document.forms[0].action="/nserverManager/sam/blank.do";
document.forms[0].submit();
}
</script>
Any ideas?
PD on purpose I wrote wrong the onclick method so I could post this message
thanks
[ October 25, 2006: Message edited by: Bear Bibeault ]