[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: not sure of how to go about this
At 10:29 AM 3/5/96 -0800, apathy wrote:
>function check(loc)
>{
>setTimeout("",1000);
>(loc!="odyssee.net") ? findHome() : parent.right.history.back();
>}
At a quick glance, this is not the proper use of setTimeout. . .
I think you meant:
setTimeout('(loc!="odyssee.net")?findHome():parent.right.history.back()',1000)
setTimout() should not be used to pause a script, but instead to delay
execution of a method/function. Are you sure that the 'loc' var is a string
your passing in?
***********
Also, this isn't right:
>while (parent.right.history.hostname != "odyssee.net") // problem line
> {
> delta -= 1;
> };
This will call an indefinate loop if it is true the first time because
.hostname never changes.
I think you'd want something like this:
if (parent.right.history.hostname == "odyssee.net") {
parent.history.back()
check()
}
This would be *syntactilcally* correct, but you're functions still have to
modified to get what you're looking for. If you want more help, give a holler.
Andy Augustine
--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/