<input type="submit" value="Send" onclick="alert('Are you really sure?')" />
1) How can I get a "OK" / "CANCEL" button, instead of just "OK"?
2) If someone is pressing "Send", the php file won't process the information unless they press "OK", right?
Alert and PHP
Moderator: General Moderators
Re: Alert and PHP
You need a confirm() box instead of alert(). And you need to handle the response properly. Try a search in Google for "javascript confirm".
Re: Alert and PHP
<form name=thefrm>
<input type="submit" value="Send" onclick="return confrim('Are you really sure?')" />
</form>
press OK will submit the form..
<input type="submit" value="Send" onclick="return confrim('Are you really sure?')" />
</form>
press OK will submit the form..