|
-
Aug 24th, 2009, 09:19 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] Using webbrowser form control by name - Question
Hi Everyone,
I am loading a form in the webbrowser control for the user to check boxes base don their needs. Now I need to read them for values, etc. I was shown how to loop through all of the controls and then for each one do something with. That's not a problem. What I was wondering is if I already have the name of a checkbox control such as chkOne and chkTwo, with code how can I refer to these to get the properties such as checked, value, etc. from without having to loop through and find them?
Thanks!
-
Aug 24th, 2009, 09:29 AM
#2
Re: Using webbrowser form control by name - Question
I'm not sure I understand whether your checkboxes are part of your VB form or web page?
If they are standard VB controls on the form then providing parent form name in front of control name is what you need [I guess]:
Form2.Check1
Form2.Check2
... and so on ...
-
Aug 24th, 2009, 09:34 AM
#3
Re: Using webbrowser form control by name - Question
Use the getElementById function of the Document object.
debug.Print WebBrowser1.Document.GetElementById("chkOne").Value
Add a reference to the MS HTML Object Library to your project. You will then have intellisense and can easily find out the different DOM functions available.
-
Aug 24th, 2009, 09:36 AM
#4
Thread Starter
Frenzied Member
Re: Using webbrowser form control by name - Question
Thanks bruce! Sorry Rhino, it is the checkbox in the html code of the webbrowser control, not a checkbox on the form. I may have not explained it well.
Checking off resolved!
Warren
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|