Hi All,
I'm using a Pop-up confirm message javascipt. When I'm applying this javascript to a submit button with the onclick event, the form in which the button is located, still submits even when I hit "NO" The form contains several onsubmit javascript actions.
Does anybody know how I can solve this problem?
Here's the code that I'm using:
Here's the code that's in the <HEAD> section
<script language="JavaScript" type="text/JavaScript">
<!--
function GP_popupConfirmMsg(msg) { //v1.0
document.MM_returnValue = confirm(msg);
}
//-->
</script>
<script language="javascript" src="../ScriptLibrary/incPureUpload.js"></script>
Here's the code from the formaction:
<form ACTION="<%=MM_editAction%>" METHOD="POST" enctype="multipart/form-data" name="frm_AddNew" id="frm_AddNew" onSubmit="checkFileUpload(this,'GIF,JPG,JPEG,BMP,PNG',false,'','','','','','','');showProgressWindow('fileCopyProgress.htm',300,100);return document.MM_returnValue">
This is the code for the submit button:
<input name="Toevoegen" type="submit" class="InputTypeButton" id="Toevoegen" onClick="GP_popupConfirmMsg('U staat op het punt een kavel toe te voegen. Wilt u doorgaan?');YY_checkform('frm_AddNew','Adres','#q','0','s.v.p. een adres invullen.','Plaats','#q','0','s.v.p. een plaats invullen.','Vraagprijs','#q','0','s.v.p. een vraagprijs invullen');return document.MM_returnValue" value="Toevoegen" />
Hope someone can help out.
Thanks in advance