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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PLZ HELP : Event Capturing, Netscape 4.7

Status
Not open for further replies.

RemoteSilicon

Programmer
Feb 13, 2001
45
GB
I have posted the question before but there was no proper reply from anyone.

I have a framed document, having three frames. Top, Left and Main. I want to execute a function in "Left" frame whenever a document is loaded in "Main" frame. Links are in "Top" frame. The problem is that top panel is updated by another person, and documents loaded in Main are made by Mr.X. What I need is a code which captures OnLoad event of any document loaded in "Main" frame. Thanks for help in advance.
 
If I read you right, you want an onload event driven from an HTML file where you don't have access to write <body onload=&quot;javascript_function(); etc...&quot;>, but you DO have write access to the parent frameset document. If so, you are in luck:

Your best friend for Netscape Javascript development is


I did a quick search in the Index area of the Client Side Javascript Reference and found
What it says is you can drive the onLoad event from the <FRAMESET> tag in the parent document. So you would just need something like <FRAMESET onload=&quot;top.Left.document.your_javascript_function()&quot;>

Obviously, you will hvae to create a separate frameset for the &quot;Main&quot; frame.
 
Thanks for your reply rycamor. But I cannot add a frameset in existing frameset. Because now the structure has been made. Tell me one thing, will I get onLoad event of frameset when the page is loaded in &quot;Main&quot; frame. Perhaps not. What should I do ? Im confused and desperately wanted someone's help
 
I think you are probably out of luck. If you can't control the frameset OR the document you want to capture onload from, then you are essentially out of the loop.

This is for scripting security. Script on one web page cannot have access to all the events from another web page.

In a situation like this you really need to communicate with the other people involved and wee if you can work together to solve the problems.

Failing that, you might be able to write a more complex script that does some sort of a &quot;check&quot; on the status of the other pages every few seconds (or milliseconds, if you want). This method doesn't give you access to the events but you can find the filename of the page that is loaded, and maybe check to see if the final </html> has loaded, or something like that. It would take a bit of research. Internet Explorer will probably give you more of an advantage in this area than Netscape 4.7. (Don't know about Netscape 6)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top