Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Readystate alternative for Netscape

Status
Not open for further replies.

louistaub

Programmer
Sep 21, 2001
20
0
0
GB
Does anyone know of an alternative to readystate for netscape. I'm developing some drop down menus to go across frames, so I cannot use the onload function. I need to know when a document is loaded so I can then insert the menu code into the document.

Any help greatly appreciated

Thanks

Louis
 
I am developing a drop down menu that works across frames. I don't want to use onload because that means that I will have to insert it into every document that I call. I have my drop down menu working nicely in IE, I just need to finish it off by getting it all to work in Netscape. I am only working on Netscape 6 at the moment as that's easier. The code below is what i am using readystate with. This loads the drop down menu code into the document when the document has finished loading.

if (document.all){
if(top.frames[2].document.readyState=="complete"){
loadDropDown();
}
else setTimeout('onloadListener()',10);
}
}

Thanks

Louis
 
if(document.all && top.frames[2].document.readyState=="complete")
{
loadDropDown();
}
else if (document.getElementById && top.frames[2].document.body)
{
loadDropDown();
}
else
{
setTimeout('onloadListener()',10);
}

Try. This is just a guess but I can't assure you it will work. Gary Haran
 
I tried out your idea buy got no joy. I am not sure whether the drop down menu will not load into the document because the document hasn't finished loading or where else it could be going wrong.

Here is a link to the stuff. It doesn't work with nestscape here, and not very well with IE also. I put my work on this server so other people can view because I don't think the server I am working will work from someone elses machine, you can try the second link but I don't think it'll work.



Thanks for the idea


Louis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top