
Heya - I'm sorry to bother you, but I'm wondering if someone can help me out.
I managed to code the following tester page using a tutorial and editing it:
- HTML: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><title>Alert Test</title>
<script type="text/javascript">
<!--
function confirmation() {
var answer = confirm("You are now leaving this site" + '\n' + " and entering a search site")
if (answer){
alert("Bye bye!")
window.location = "http://www.google.com";
}
}
//-->
</script>
</head>
<body>
<form>
<input type="button" onclick="confirmation()" value="other site">
</form>
</body>
</html>
I've linked to it here
http://www.sorchajane.co.uk/alertboxtest3.html
What I'm trying to do is to make the "google" link open in a new window. At the moment, it just opens in the same one. Is this even possible? I feel really stupid and embarrassed by this.
Also instead of using the form and button approach, is it possible to use images and if so, would the image need to be in a form?
Any help would be greatly appreciated.
Thanks in advance
Popje
