mg8
09-26-2003, 03:59 PM
I want it to load, then if you can go back, go back. If you can't, close the window. Doesn't make much sense but stick with me:
<html>
<body>
<script language="javascript" type="text/javascript">
function zargon()
{
if (window.back()) {
window.back();
}
else {
window.close();
}
}
</script>
<body onLoad="zargon()">
</body>
</html>
That is what I have. I get an error with the window.back() thing and I'm not sure why? Is the problem with mixing Javascript and HTML?
<html>
<body>
<script language="javascript" type="text/javascript">
function zargon()
{
if (window.back()) {
window.back();
}
else {
window.close();
}
}
</script>
<body onLoad="zargon()">
</body>
</html>
That is what I have. I get an error with the window.back() thing and I'm not sure why? Is the problem with mixing Javascript and HTML?