loading HTML doc with ajax on page using XMLHTTP60

lewisgmorris

Board Regular
Joined
Oct 23, 2014
Messages
119
I am using internet explorer at the moment and its an absolute pain.

Can you use XMLHTTP60 to load the html doc if the page contains ajax which loads after the page has? Because when i use the XMLHTTP60 it isn't contained in the document.

Any one got any ideas?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
You would have to send a separate XMLhttp request to request the part of the webpage loaded by ajax, the same that IE does internally. And deal with the 2 documents separately.

An alternative to IE, which internally seems to do everything that IE does when it loads a page, without the visual rendering, is CreateDocumentFromUrl:

Code:
    Dim HTMLdoc As HTMLDocument, HTMLdoc2 As IHTMLDocument4

    Set HTMLdoc2 = New HTMLDocument
    Set HTMLdoc = HTMLdoc2.createDocumentFromUrl("http://www.page.com", "")
    While HTMLdoc.readyState <> "complete": DoEvents: Wend
    'Now parse HTMLdoc
CreateDocumentFromUrl can only be used with early binding so you must set a reference to Microsoft HTML Object Library.
 
Upvote 0

Forum statistics

Threads
1,215,330
Messages
6,124,307
Members
449,151
Latest member
JOOJ

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top