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!

How to let right frame LISTENS to the left frame? 1

Status
Not open for further replies.

lcs01

Programmer
Aug 2, 2006
182
US
I have an html page created by a mod_perl code. This html page consists of left & right frames.

The contents in left frame are dynamically created which may take a bit time.

Here is what I want to implement:

While the contents in the left frame is forming, a message in the right frame showing "Wait...". Once the contents in the left frame is fully displayed, the message in the right frame changes to "Completed".

Could someone here please show me how to implement this in javascript? Many thanks!
 
The right frame doesn't really need to listen to the left frame, the left frame just needs to let the right frame know that it's done.

By default hide all the content in the right frame (using CSS, ask in that forum if you need assistance for that), and use an onload handler in the left frame to display the right frame when it's done.

Something like this:
Code:
<script type="text/javascript">

window.onload = function () {
   parent.frames[1].document.getElementById("body").style.display = "block";
};

</script>

-kaht

[small](All puppies have now found loving homes, thanks for all who showed interest)[/small]
 
Thank you so much, kaht. And sorry to get back to you late.

With your help, I have solved the problem.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top