good day!
in creating links that will whether delete a database record, or make a user leave from current site, or simply redirect him/her to other site, it would be a good pratice to verify the action being taken. it could easily be impose using CONFIRM function (pls see codes below).. but why such command is not interpreted/executed in other browser except I.E. i guessed?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<title>Verify Action</title>
<meta http-equiv="Content-Type" content="text/html; charset="></meta>
<script type="text/javascript">
<!-- hide script from old browser
function start() {
document.body.innerHTML="";
linkTxt = document.createElement("p");
linkTxt.innerHTML="<a href=http://phpBuilder.com/board/ onClick='verify()'>Redirect to PHP Builder Forums</a>";
document.body.appendChild(linkTxt);
}
function verify() {
var msg = "Are you sure you want to redirect to this site?";
window.event.returnValue = false;
if (confirm(msg)) {
window.event.returnValue = true;
}
}
// end of hiding script from old browser -->
</script>
</head>
<body onLoad="start()"> </body>
</html>