Jump to content

Frame Problem


Recommended Posts

hey guys i guess i post the most here :0.

im having a prob with a frame in IE.

I followed an example posted by dale in the ie.au3 thread for getting a frame but it doesnt seem to be working on my side.

here is is the website source

<!-- frames -->
<frameset rows="90,*">

 <frame src="nav.html"
           name="nav"
           frameborder="0"
           scrolling="Auto"
           noresize
           marginwidth="10"
           marginheight="6">
    <frame src="body.html"
           name="main"
           frameborder="0"
           scrolling="Auto"
           noresize
           marginwidth="10"
           marginheight="10">
</frameset><noframes></noframes>

and here is my code

$oFrame = _IEFrameGetObjByName($oIE, "main")
            $html = _IEBodyReadHtml($oFrame)
            Run ("notepad.exe")
            WinWaitActive("Untitled - Notepad")
            Send ($html)

here is the error im getting

Line 1136 (ie.au3)

If IsObj($o_object.document) Then

If ^ ERROR

Error: The requested action with this object has failed.

if anyone can advise on what im doing wrong that would be great.

Link to comment
Share on other sites

How did you get the source you show?

If it is from a right-click view source you may be seeing the source of a frame instead of the top-level document.

Make certain you use the menu bar View Source.

Your code looks good.

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

hey guys i guess i post the most here :0.

im having a prob with a frame in IE.

I followed an example posted by dale in the ie.au3 thread for getting a frame but it doesnt seem to be working on my side.

here is is the website source

<!-- frames -->
<frameset rows="90,*">

 <frame src="nav.html"
           name="nav"
           frameborder="0"
           scrolling="Auto"
           noresize
           marginwidth="10"
           marginheight="6">
    <frame src="body.html"
           name="main"
           frameborder="0"
           scrolling="Auto"
           noresize
           marginwidth="10"
           marginheight="10">
</frameset><noframes></noframes>

and here is my code

$oFrame = _IEFrameGetObjByName($oIE, "main")
            $html = _IEBodyReadHtml($oFrame)
            Run ("notepad.exe")
            WinWaitActive("Untitled - Notepad")
            Send ($html)

here is the error im getting

Line 1136 (ie.au3)

If IsObj($o_object.document) Then

If ^ ERROR

Error: The requested action with this object has failed.

if anyone can advise on what im doing wrong that would be great.

if it's being too troublesome to work in frames, you see the source of each frame there, nav.html and body.html, you CAN navigate directly to either of those, and interact with them instead of arguing with frames.
Link to comment
Share on other sites

thats whats weird, if i goto body.html it is a different page then what im looking at

but yet the source says body.html is the page its going to

make sure you're going to body.html in the right directory. it would be in the same directory as the page with the frames.
Link to comment
Share on other sites

whats weird is as i browse through website the url never changes

its always www.website.com no matter where i go but i know that its loading pages from diff directories

well if you're navigating within the frames, it loads the new pages to target frames, rather than changing the url that you're browsing.
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...