You are here: irt.org | BBS | Re: Preventing a user from returning to previous page [This BBS is closed]
Posted by Chris Woyton on June 22, 1998 at 16:54:37:
In Reply to: Re: Preventing a user from returning to previous page posted by Martin Webb on June 12, 1998 at 03:08:47:
Actually, this is what finally worked.
<html>
<head>
<script language="javascript">
function texttest ()
{
var here = this.location.href
var textvalue = document.test.text.value
if (textvalue == "")
window.open (here)
else
window.open ("thanks.htm")
}
</script>
<title>Test Survey</title>
<body bgcolor="#FFFFFF" extcolor="black" onUnload=texttest ()>
<form>
<input type="text" name="test">
</body>
</html>
Using the onUnload event is obnoxious as hell, as you can't even close the browser unless you do the thing that's requested. However, since this is an intranet site, we can abuse our clients somewhat. :)
Follow-ups:
You are here: irt.org | BBS | Re: Preventing a user from returning to previous page [This BBS is closed]