Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML DOM and Objects Library Question

Status
Not open for further replies.

Panthaur

IS-IT--Management
Jul 26, 2002
78
US
Greetings all,

I have a weird situation. I need the ability to load a particular HTML DOM path from a config file and be able to reference it once I have a selected web page displayed within the webbrowser control. For example:

The dom path to a select box on a webpage would be something like:

wb.Document.frames.middle.Document.frames.inputscreen.Document.Forms.datacollectionform.selectboxname

The problem arises that in similar websites, the name of the particular form element (in this case "selectboxname") sometimes changes to something like "selectboxname1" or whatever. Finding the name of this select box is pretty easy, so, I figured that putting this into a config file and reading it in would be pretty easy. Unfortunately, I need to make a variable (object reference) with a reference to that particular type of form element.

IE: Public SELECTBOXPATH As ??HTMLSelectElement??

The problems are as follows:
1) I don't know what element to set the SELECTBOXPATH to. I'm guessing at HTMLSelectElement.

2) I don't know how to assign the dom path to the SELECTBOXPATH so that inside my code I can reference that path using the SELECTBOXPATH, something like:

wb.SELECTBOXPATH.options.length

instead of having to hardcode something like:

wb.Document.frames.middle.Document.frames.inputscreen.Document.Forms.datacollectionform.selectboxname.options.length

If anyone can please help, it would be much appreciated.

Thanks,
Pan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top