Jump to content

IELoadWait on a given frame


Recommended Posts

Can IELoadWait be used to determine if a specific frame is loaded? I tried using a frame object variable in the function, but didn't get the desired effect. On a related note, could it be the effect of JS on the loaded page that's causing me trouble? In other words, does JS take effect after IELoadWait would register the page (frame hoepfully), as loaded? Thanks for your help, and my apologies if my question is unclear.

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

_IELoadWait does work on a Frame (as returned from _IEFrameGetObjByName or Index). The way _IELoadWait works is that it checks the readyState of the document contained until it is set to "complete" (it then walks up the DOM hierarchy as far as it can to insure parent objects are also complete).

So, if the document in the frame goes to a "complete" state, but there is an onload Javascript event on the document body (or some other similar mechanism) that performs some action it will not be caught because _IELoadWait believes it has already done its job.

If this is the case, you'll need to insure you understand what is happening and call _IELoadWait again after a delay or look for some other indication that the document is complete.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Thanks for the info Dale.

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
Link to comment
Share on other sites

  • 2 years later...

_IELoadWait does work on a Frame (as returned from _IEFrameGetObjByName or Index). The way _IELoadWait works is that it checks the readyState of the document contained until it is set to "complete" (it then walks up the DOM hierarchy as far as it can to insure parent objects are also complete).

So, if the document in the frame goes to a "complete" state, but there is an onload Javascript event on the document body (or some other similar mechanism) that performs some action it will not be caught because _IELoadWait believes it has already done its job.

If this is the case, you'll need to insure you understand what is happening and call _IELoadWait again after a delay or look for some other indication that the document is complete.

Dale

Any ideas what I can look at to "look for some other indication that the document is complete."?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...