Jump to content

getting locationurl failed


Recommended Posts

I just trying

$url = _IEPropertyGet ($oFrame, "locationurl");

Sometimes it wokrs but in 1 case of 50 it failed with "The requested action with this object has failed".

I tried use _IEErrorHandlerRegister(). _IEPropertyGet failed with error = 2 (no description for it) and it write

---->$IEComErrorScriptline = 2952
----> $IEComErrorNumberHex = 80070005
----> $IEComErrorNumber = -2147024891
----> $IEComErrorWinDescription = Access denied.
----> $IEComErrorDescription = 
----> $IEComErrorSource = 
---->$IEComErrorHelpFile = 
----> $IEComErrorHelpContext =
----> $IEComErrorLastDllError = 0

I search about it on forum and i saw something about cross-scripting restriction with frames. But i checked the url's of frames - they are in one domain. Additionally, i use the same code to get debug information (write in file html-code of page and frames) and it works.

Plz help me to solve this problem.

Link to comment
Share on other sites

It's not necessarily an issue from frame to frame, but and issue from the top level document to the frame in question.

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

As I understand you mean that

$oFrame.location.href
$oFrame.top.location.href

must be in one domain, isnt it? I check - they in one domain.

And I dont understand one thing - my function where i get location url may work correct 10-50 times but sometimes it failed.

Link to comment
Share on other sites

See here: http://msdn2.microsoft.com/en-us/library/m...028(VS.85).aspx

For most content, only interactions with content from the same domain are allowed. For example, a typical page on www.microsoft.com can freely script content on any other page on www.microsoft.com, but cannot script to pages that are located on a different Web domain. The DHTML Object Model uses the document.domain property to enforce this restriction: only pages with identical domain properties are allowed free interaction. The protocol of the URL must also match. For instance, an HTTP page cannot access HTTPS content.

So these must match:

$oFrame.document.domain

and

$oFrame.top.document.domain

For the URL above, that turns out to be msdn2.microsoft.com, not just microsoft.com

The only other time I've seen this is when you try to access the property in the middle of a page update operation or when there is an Ajax update occuring (seen this on gmail).

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

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...