Hi All,
Trying to get my code to re-execute a function every 5 secs - setTimeout(urlTest = getThuleInfo(), 5000); Everything works fine for the first loop. After that it just sits there. If anyone has any suggestions, I would appreciate it. Also, I'm try to get the document.write('NO not yet..., ', urlRef); to work. It displays the info ok but won't return to start the next loop. Any pointers?
TIA,
T
Trying to get my code to re-execute a function every 5 secs - setTimeout(urlTest = getThuleInfo(), 5000); Everything works fine for the first loop. After that it just sits there. If anyone has any suggestions, I would appreciate it. Also, I'm try to get the document.write('NO not yet..., ', urlRef); to work. It displays the info ok but won't return to start the next loop. Any pointers?
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM WebSphere Studio">
<TITLE>nav.htm</TITLE>
</HEAD>
<BODY onload="urlInfo();">
<!--<BODY>
<form name="NavCatFrm" method="POST" action="">
<input type="button" value="get URL" onclick="urlInfo();">
</form>-->
<script>
function urlInfo() {
var urlTest = "true";
do {
alert("IN Do...");
setTimeout(urlTest = getThuleInfo(), 5000);
alert("OUT Do... " + urlTest);
if(urlTest == "false") {
alert("urlTest is ... " + urlTest);
break;
}
}while (urlTest = "true");
}
function getThuleInfo () {
var urlRef = parent.frameA.location.href;
var myArray = urlRef.split("fg_total.asp?");
var myInfo = myArray[1];
if(typeof(myInfo) != "undefined") {
alert("myArray info ... " + myArray);
urlTest = "false";
return urlTest;
}else {
//alert("Nothing yet... " + urlRef);
document.write('NO not yet..., ', urlRef);
//return urlTest = "true";
}
}
</script>
</BODY>
</HTML>
TIA,
T