The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Javascript Window problem......

I have been tasked with creating a popup warning window for my day job. I was able to find some dhtml code that does this quite nicely, however, I cannot get it to do 1 task that is needed. If the user does not agree with the terms, then they are sent somewhere else.

I have posted both pages below if anyone can help. Both pages are Cold Fusion pages with some JS mixed in.

<html>
<head>
<title>WARNING! FOR OFFICIAL USE ONLY</title>
<style>
body{
border: 4px solid #000000;
}
</style>
<script>
function stayontop(){ //Brings the current window on top of others
self.focus();
setTimeout("stayontop()", 1000); //1000 = 1 sec
}
</script>
</head>
<body>
<br>
<table cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td colspan="2">
<font face="Helvetica, verdana, arial">
<center><b>WARNING! FOR OFFICIAL USE ONLY</b></center><br><br>
This is a U.S. Government computer system and is intended<br>
for official and other authorized use only. Unauthorized access<br>
or use of this system may subject violators to administrative<br>
action, civil, and/or criminal prosecution under the United<br>
States Criminal Code (Title 18 U.S.C &sect; 1030).<br><br>

All information on this computer system may be monitored,<br>
intercepted, recorded, read, copied, or captured and disclosed<br>
by and to authorized personnel for official purposes, including<br>
criminal prosecution. <b>You have no expectations of privacy<br>
using this system.</b><br><br>

If the user does not agree try calling the following before closing the popup window:

Code:

top.window.parent.location.href = 'http://www.whereiwantyou.com';

This should change the location of the main browser window to the URL that you specify. Note that I haven't tested this so it may need a bit of fiddling (such as removing the 'top.' portion, for instance).