Click to See Complete Forum and Search --> : check page for validity


muppets
10-19-2003, 03:03 AM
Found a solution for my previous post on the web dev search but can't get the script to work. can anyone help?

<html>
<head>
<title>Check Video Status</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body bgcolor="#FFFFFF" text="#000000">
<script language="javascript">
function check()
{
var desired_url = "/JetvideoPlay.html";
var mainURL = "document.main.location.href";
var alternate_url = "/NoVideo.html";
if (mainURL != desired_url)
{document.main.location.href = alternate_url}
else {}
}
setTimeout('check();', 10);
window.clearTimeout
</script>
</body>
</html>

pelegk1
10-19-2003, 03:12 AM
u did
window.clearTimeout

write after setTime()
it deleted immediatly your request
just delete that line beacuse setTime()
function will happen only once when the time is out

muppets
10-19-2003, 03:22 AM
removed the clear timeout but still no avail

muppets
10-19-2003, 07:00 AM
found out document.main.location.href is not working why is this?