THE ANSWER:
Ok so I was having a conversation with another programmer in the
office. I told him I knew how to execute a JavaScript function on a
web page hosted by IE's Web Browser control (shdocvw.dll), but I
didn't know how to access a child object on the page. My desktop
application is using this control to host a web page that contains a
JavaApplet. The JavaApplet exposes functions that can be executed by
JavaScript. For example, I can place the following code in the click
event of a button to zoom in on the image:
document.viewOne.zoomIn();
document is just that the parent object. viewOne is the child object
on the page which in this case is the ViewOne Pro Java Applet.
Finally, zoomIn() is a function of the applet that is exposed to
JavaScript. The goofy way to implement this would be to wrap the line
above in a Javascript function (ZoomDaPage) which I could later
execute with the line below:
Me.wbImageViewer.Document.parentWindow.execScript "ZoomDaPage();",
"JScript"
Then it hit me. Wait whit don't I just execute an inline / no name /
self executing function? Below is the answer:
Me.wbImageViewer.Document.parentWindow.execScript "(function()
{document.ViewONE.zoomIn();}());", "JScript"
JavaScript Inline functions will allow me complete control of a
rendered web page within my Web Browser object.
Now, you may have caught on that this is a VB6 desktop application but
my original question as about JavaScript. Trust me, this group would
have had a better shot at the answer than the legacy VB group.