Confirm Issues
I am trying to make a script that will send me to a certain page if I click ok or another if I click cancel. This is just a test for another script I am going to use it in, but for some reason none of the javascript is working. Here is the code:
HTML Code:
<html>
<head>
<title>Confirm Test</title>
</head>
<body>
<script language="javascript" type="text/javascript">
<!--
var answer = confrim("Are you sure you want to delete")
if(answer) {
window.location = "http://www.google.com";
} else {
window.location = "http://echo-designes.com";
}
//-->
</script>
<a href="javascript:check()">Check</a>
</body>
</html>
The confirm box never shows up, but if I throw an alert above it, the alert shows up. Another issue I am having is that whenever I try to make a link to a javascript function, it fails. For example, in one of my scripts I used: <a href="javascript:window.close()">Close Window</a> and it worked fine. Then I turned around and tried to do it in another script and it does not work. I have no idea what is wrong because I literally copied and pasted it to the other script and it won't work. Any ideas. Thanks in advance
Thanks DD, you saved me countless times
Bookmarks