View Single Post
Old 07-17-2013, 06:59 AM
re210m re210m is offline
Registered User
Join Date: May 2013
Posts: 4
Post Building Custom Forms with Javascript

Hi everyone,

I'm trying to build custom forms using the Internet Explorer object, but I'd like to be able to use JavaScript in the form. I'm trying to use the buttonhandler example from section 6.3 of the VanDyke Scripting guide as a basis. I've tried a couple of different methods and so far, nothing works.

Using the objIE.document.body.innerHTML doesn't allow for the addition of <script> tags in the head to include the needed JavaScript libraries, so I've tried both of the following alternatives:

Building the webpage form using objIE.document.write (and including everything from the <head> and <body>) causes any <script> tags to be ignored. Button presses are still passed back to the VBScript from which it was launched, but there's no ability to have a dynamic page as the JavaScript doesn't load.

I've built the page into a index.html document that I can use with objIE.navigate "<path>/index.html", but this doesn't allow button presses from the buttonhandler to be referred back to the VBScript from which it was launched. I know the buttonhandler from the example is waiting for objIE.Document.All("ButtonHandler").Value, which in this case is irrelevant since the document object is empty.

Is there something I'm missing on one of these methods, or can anyone recommend a workaround? My ultimate goal is to build a tabbed user experience, with each JavaScript tab on the page containing buttons the user can press. Any help is greatly appreciated. Thanks!!
Reply With Quote