I am using an Access form with a web browser set on a certain webpage.
With the MSHTML library as a reference, I iterate through the node tree to obtain certain elements that I want. For example:
[vba]
command1_click
dim doc as mshtml.htmldocument
set doc=me.webBrowser1.Document
debug.print doc.scripts(1).nodeValue
end sub
[/vba] In the example above, I retrieve the node value from one of the script tags in the web page.
Working through the node tree works well for most properties (or attributes or whatever the proper term is). But it will not work for extracting the variables (aka parameters aka arguments) from inside a script tag.
<SCRIPT type=text/javascript>
var blah blah blah blah
var blah blah blah blah
var blah blah blah blah
var blah blah blah blah
var DBLE_CLK_PARAMS = { 'SKIES': 'cloudy', 'AIR_QUALITY': 'fair' }
var blah blah blah blah
var blah blah blah blah
var blah blah blah blah
</SCRIPT>
Now, with VBA, I want to "debug.print" the value for the skies parameter and the air_quality parameter. I can see the whole thing if I "debug.print" childnode.innerhtml. But I cannot selectively "debug.print" only one of the variables.
I am a newbie in HTML and I know next to nothing about JavaScript. So please break your explanations down for me.
Does anyone know how to get at these parameters inside the script tags in VBA WITHOUT using a whole bunch of text manipulation?