[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

not sure of how to go about this



hi,

i have a set of pages with three frames set up this way:

________________
|  header      |
----------------
|left |  right |
|     |        |
----------------

while the right frame usually contains pages local to my host,
odyssee.net, external hostnames sometimes will be put in that frame for 
my site visitors to explore.

in the header, i would like to have a back button which brings the site 
visitor back to the last page they visited on my host. ie: the visitor
loads the file http://www.odyssee.net/~myLogin/right.html and follows a 
link to an external site from right.html . he then pokes around the 
external site and eventually bores of it. he hits the return button in my 
header frame. this calls a function that looks through at the hostname 
property of all the previous pages loaded into the right frame until it 
finds an URL with the hostname odyssee.net .

problem is, i'm not sure hwo to implement it; netscape keeps telling me 
that line 28 is not a number. i assume this means that there's something 
wrong with the line commented as a problem line. here's the script -- 
check(loc) is called first

<SCRIPT LANGUAGE="JavaScript">
<!-- hide it

var delta=-1

function check(loc)
{
setTimeout("",1000);
(loc!="odyssee.net") ? findHome() : parent.right.history.back();
}

function findHome()
{
while (parent.right.history.hostname != "odyssee.net")  // problem line
  {
    delta -= 1;
  };
parent.right.history.go("delta");
}
<!-- end hide-->
</SCRIPT>

thnx in advance
ju

--------------------------------------------------------------------
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/