Wrox Programmer Forums
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 17th, 2004, 12:18 AM
Authorized User
 
Join Date: Nov 2003
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default IFRAME Load...

Hi,

I have an ASP page, which loads 3 iFRAMEs. It's like all frames are set to display:none. Only 1 Frame is set as display:block.
The problem is that, how do I determine if the page is loaded. That is, after I load the contents to a iFrame and then set the display to block, I don't have access to the iFrame's variables. It actually takes a while for the page to load and access the variables. Is there any way I can write a code to perform this wait.



 
Old June 17th, 2004, 01:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

In the main page create a var for each IFRAME and the main page and then have an ONLOAD event of each set their variable, you can then test the status of these to see what has loaded.
 
Old June 18th, 2004, 03:28 AM
Authorized User
 
Join Date: Nov 2003
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Greg,

Actually, this would not work well.

For Ex:
1: document.all("ifrTest").location.href = "test.asp"
2: document.all("ifrTest").runtimeStyle.display = 'block'
3: ---

In Line 3, I cannot access any variable of "test.asp". But I can access the current page variables. If I put an flag variable for onload of test.asp, there seems to be a problem in change of value.
I cannot put an while loop and wait for the value to change. This is because, the page does not load. It waits for the while loop to complete. So, how do I put on a function that performs a wait for iframe load. I also tried "readyState". But no luck.

Please Advice,

Babloo






Similar Threads
Thread Thread Starter Forum Replies Last Post
load iframe krutika Javascript 4 August 1st, 2008 02:59 PM
values from one iframe to another iframe URGENT raaj Beginning PHP 2 February 27th, 2007 12:19 PM
iframe help splinterz HTML Code Clinic 12 April 13th, 2005 01:42 AM
iframe rockon HTML Code Clinic 1 March 2nd, 2005 06:00 AM
iframe...or a better way? stacy HTML Code Clinic 4 September 4th, 2004 11:04 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.