Page 1 of 1

Alert and PHP

Posted: Fri May 15, 2009 6:41 am
by JKM
<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?

Re: Alert and PHP

Posted: Fri May 15, 2009 7:14 am
by onion2k
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

Posted: Wed May 20, 2009 10:50 am
by myismymxd
<form name=thefrm>
<input type="submit" value="Send" onclick="return confrim('Are you really sure?')" />
</form>
press OK will submit the form..