473,218 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,218 software developers and data experts.

Page and Iframe, wait for iframe to load before manipulating the DOM

Do you know if it is possible to wait for the iframe page to load and
then manipulate the iframe DOM.

E.g.
mypage:
<script>
function myinit() {
theiframe.location = "iframe_with_frames.html"
waitforiframe() {
theiframe.frames[0].location ="mynewpage3.html";
}
}
</script>
<body onload="myinit();">
<iframe src="empty_page.html" name="theiframe" />
</body>

iframe_with_frames.html:
<frameset>
<frame src="page1">
<frame src="page2">
</frameset>
Feb 5 '08 #1
5 7320
On Feb 5, 1:27*pm, BerlinBrown <berlin.br...@gmail.comwrote:
Do you know if it is possible to wait for the iframe page to load and
then manipulate the iframe DOM.

E.g.
mypage:
<script>
* function myinit() {
* * theiframe.location = "iframe_with_frames.html"
* * waitforiframe() {
* * * * * *theiframe.frames[0].location ="mynewpage3.html";
* * }
* }
</script>
<body onload="myinit();">
* <iframe src="empty_page.html" name="theiframe" />
</body>

iframe_with_frames.html:
<frameset>
* <frame src="page1">
* *<frame src="page2">
</frameset>
Hi, Thanks for your reply. I may not have control on the iframe
contents. Also where is waitforiframe being called and where would
trigger the start time in your case?

Thanks.
Feb 5 '08 #2
On Feb 5, 5:04 pm, Madhumita <mita.mal...@gmail.comwrote:
On Feb 5, 1:27 pm, BerlinBrown <berlin.br...@gmail.comwrote:
Do you know if it is possible to wait for the iframe page to load and
then manipulate the iframe DOM.
E.g.
mypage:
<script>
function myinit() {
theiframe.location = "iframe_with_frames.html"
waitforiframe() {
theiframe.frames[0].location ="mynewpage3.html";
}
}
</script>
<body onload="myinit();">
<iframe src="empty_page.html" name="theiframe" />
</body>
iframe_with_frames.html:
<frameset>
<frame src="page1">
<frame src="page2">
</frameset>

Hi, Thanks for your reply. I may not have control on the iframe
contents. Also where is waitforiframe being called and where would
trigger the start time in your case?

Thanks.
That is pseudo code. I don't have the implementation.
waitforiframe() { }

Should you even wait for the iframe to load. Ideally I want to avoid
using timers.

Feb 5 '08 #3
On Feb 5, 2:21*pm, BerlinBrown <berlin.br...@gmail.comwrote:
On Feb 5, 5:04 pm, Madhumita <mita.mal...@gmail.comwrote:


On Feb 5, 1:27 pm, BerlinBrown <berlin.br...@gmail.comwrote:
Do you know if it is possible to wait for the iframe page to load and
then manipulate the iframe DOM.
E.g.
mypage:
<script>
* function myinit() {
* * theiframe.location = "iframe_with_frames.html"
* * waitforiframe() {
* * * * * *theiframe.frames[0].location ="mynewpage3.html";
* * }
* }
</script>
<body onload="myinit();">
* <iframe src="empty_page.html" name="theiframe" />
</body>
iframe_with_frames.html:
<frameset>
* <frame src="page1">
* *<frame src="page2">
</frameset>
Hi, Thanks for your reply. I may not have control on the iframe
contents. Also where is waitforiframe being called and where would
trigger the start time in your case?
Thanks.

That is pseudo code. *I don't have the implementation.
waitforiframe() { }

Should you even wait for the iframe to load. *Ideally I want to avoid
using timers.- Hide quoted text -

- Show quoted text -
Timer means just doing a Date() function. Why would you avoid that?
How else would you compute the loading time?
My question was not implementation specific, I didn't see the use of
your waitforiframe question.

Thanks.
Feb 5 '08 #4
On Feb 5, 5:34 pm, Madhumita <mita.mal...@gmail.comwrote:
On Feb 5, 2:21 pm, BerlinBrown <berlin.br...@gmail.comwrote:
On Feb 5, 5:04 pm, Madhumita <mita.mal...@gmail.comwrote:
On Feb 5, 1:27 pm, BerlinBrown <berlin.br...@gmail.comwrote:
Do you know if it is possible to wait for the iframe page to load and
then manipulate the iframe DOM.
E.g.
mypage:
<script>
function myinit() {
theiframe.location = "iframe_with_frames.html"
waitforiframe() {
theiframe.frames[0].location ="mynewpage3.html";
}
}
</script>
<body onload="myinit();">
<iframe src="empty_page.html" name="theiframe" />
</body>
iframe_with_frames.html:
<frameset>
<frame src="page1">
<frame src="page2">
</frameset>
Hi, Thanks for your reply. I may not have control on the iframe
contents. Also where is waitforiframe being called and where would
trigger the start time in your case?
Thanks.
That is pseudo code. I don't have the implementation.
waitforiframe() { }
Should you even wait for the iframe to load. Ideally I want to avoid
using timers.- Hide quoted text -
- Show quoted text -

Timer means just doing a Date() function. Why would you avoid that?
How else would you compute the loading time?
My question was not implementation specific, I didn't see the use of
your waitforiframe question.

Thanks.
How else would you compute the loading time?
I don't need to compute the loading time? I dont think.

If I run the code here, it won't acknowledge:
theiframe.frames[0]

Because this operation probably hasn't completed yet.
theiframe.location = "iframe_with_frames.html"

Is there a way to "wait" for the iframe to load and then set the frame
data.

I was looking at addEvent.'onload' but from reading online, doesn't
apply to sub-dom objects, only the current page.

function myinit() {
theiframe.location = "iframe_with_frames.html"
theiframe.frames[0].location ="mynewpage3.html";
}

Feb 5 '08 #5
On Feb 5, 5:39 pm, BerlinBrown <berlin.br...@gmail.comwrote:
On Feb 5, 5:34 pm, Madhumita <mita.mal...@gmail.comwrote:
On Feb 5, 2:21 pm, BerlinBrown <berlin.br...@gmail.comwrote:
On Feb 5, 5:04 pm, Madhumita <mita.mal...@gmail.comwrote:
On Feb 5, 1:27 pm, BerlinBrown <berlin.br...@gmail.comwrote:
Do you know if it is possible to wait for the iframe page to load and
then manipulate the iframe DOM.
E.g.
mypage:
<script>
function myinit() {
theiframe.location = "iframe_with_frames.html"
waitforiframe() {
theiframe.frames[0].location ="mynewpage3.html";
}
}
</script>
<body onload="myinit();">
<iframe src="empty_page.html" name="theiframe" />
</body>
iframe_with_frames.html:
<frameset>
<frame src="page1">
<frame src="page2">
</frameset>
Hi, Thanks for your reply. I may not have control on the iframe
contents. Also where is waitforiframe being called and where would
trigger the start time in your case?
Thanks.
That is pseudo code. I don't have the implementation.
waitforiframe() { }
Should you even wait for the iframe to load. Ideally I want to avoid
using timers.- Hide quoted text -
- Show quoted text -
Timer means just doing a Date() function. Why would you avoid that?
How else would you compute the loading time?
My question was not implementation specific, I didn't see the use of
your waitforiframe question.
Thanks.
How else would you compute the loading time?

I don't need to compute the loading time? I dont think.

If I run the code here, it won't acknowledge:
theiframe.frames[0]

Because this operation probably hasn't completed yet.
theiframe.location = "iframe_with_frames.html"

Is there a way to "wait" for the iframe to load and then set the frame
data.

I was looking at addEvent.'onload' but from reading online, doesn't
apply to sub-dom objects, only the current page.

function myinit() {
theiframe.location = "iframe_with_frames.html"
theiframe.frames[0].location ="mynewpage3.html";
}

Sorry, I saw your early question; I am not responding your EARLIER
question. I started a new one on a similar subject. Wow, it is a
small world, the questions are very similar and about the same time.
Feb 5 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: adnanx82 | last post by:
Hi, I was wondering if anyone knew how to perform the following 2 tasks in Javascript: 1) distinguish between frames and iframes (during an onload event for example) 2) figure out whether a...
1
by: Mel | last post by:
how can i wait for one iframe to completely load before loading a second one ? thanks for your help
18
by: Alan Z. Scharf | last post by:
1. I have a chain of six asynch callbacks initiated by a button, and want the page to refresh at the end of each callback to display A. Results of a SQLServer query showing cumulative running...
8
by: TC | last post by:
Hello, I am making an asynchronous call to a webservice and trying to update the web page with the results. The page is not updating. Does anybody know why??? Below is my code:
1
by: Balaji | last post by:
Hi there, I have a strange problem. In our app we have a iframe and load all the pages in the iframe for the menu which is available in the page. Using a dive we have displayed a please wait...
1
by: Z1P2 | last post by:
I would like to gradually resize an iframe in an onmouseover event. I can easily do it with an image, but when I try to do it with an iframe, it doesn't do anything. So first of all, is it possible...
1
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Mister, any solution about it ? any sample code please ?? thanks in advance
0
by: John Kotuby | last post by:
Hi all, I am trying to add some advanced search tools to a standard HTML website by using an Iframe whose SRC attribute points to a remote ASP.NET site which contains the advanced search tool...
7
by: kaer | last post by:
I have to send an XPath request on web page with JavaScript (with XMLHttpRequest) that has to be executed before. I have no idea on how to do that. Any pointer is welcome.
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.