patrickstrijdonck
Programmer
Hi all,
In PHP section i asked how i can create a confirmbox before it will submit the form,
Here what i have now:
and as button i have:
When i press the button, it should go to the function, but instead, it justs submits the form.... without asking the question to confirm the delete....
Doing something wrong??
In PHP section i asked how i can create a confirmbox before it will submit the form,
Here what i have now:
Code:
?>
<SCRIPT LANGUAGE="Javascript">
<!--
function checkAction(myMessage) { result=confirm(myMessage);
if (result==true) { return true; }
else
{ return false; }
}
//-->
</SCRIPT>
and as button i have:
Code:
<input class="form_button" name="DEL" type="submit" value="Personeelslid Verwijderen" onClick="return checkAction(\'Weet u zeker dat u deze personeelslid wilt verwijderen?\')" />
When i press the button, it should go to the function, but instead, it justs submits the form.... without asking the question to confirm the delete....
Doing something wrong??