How do I set a radio value ?
I.e. WebBrowser1.Document.Forms(0).radioname.Value = "Option1"?
The HTML is:
<INPUT TYPE="RADIO" NAME="O_T" VALUE="O" >O
<INPUT TYPE="RADIO" NAME="O_O" VALUE="T" >T
Printable View
How do I set a radio value ?
I.e. WebBrowser1.Document.Forms(0).radioname.Value = "Option1"?
The HTML is:
<INPUT TYPE="RADIO" NAME="O_T" VALUE="O" >O
<INPUT TYPE="RADIO" NAME="O_O" VALUE="T" >T
<INPUT TYPE="RADIO" NAME="O_T" VALUE="O" checked>
You can also do this in VBScript. This requires a browser which supports DHTML. To do this you must have the input tag inside div tags.
<div id=test>
<INPUT TYPE="RADIO" NAME="O_T" VALUE="0">
</div>
To turn it on use the following code:
To turn it off use:Code:
test.InnerHtml = "<INPUT TYPE=""RADIO"" NAME=""O_T"" VALUE=""0"" CHECKED>"
Hope that helped.Code:
test.InnerHtml = "<INPUT TYPE=""RADIO"" NAME=""O_T"" VALUE=""0"">"
Thanks but I would like to do it in VB using the webbrowser control what I do for text is:
WebBrowser1.Document.Forms(0).textboxname.Value = "Whatever"
can you tell me how to do that with radio/checkboxes?
Then you can use:
Code:WebBrowser1.document.forms("test").R1.checked = false
Thanks, that works for a checkbox, what about a radio?
It is the same for radio.
sorry, but it doesn't work, and I can't use it for a radio like:
<INPUT TYPE="RADIO" NAME="O_T" VALUE="O" >O
<INPUT TYPE="RADIO" NAME="O_T" VALUE="T" >T
webbrowser1.forms(0).O_T.????
Code:WebBrowser1.document.forms("test").O_T.checked = false
Thanks, but what I want to know is how to choose one of them (O or T).
And one more question, I've suceeded in loging into yahoo mail and getting into the inbox throught webbrowser in vb but I would like to know how I can open a cerin message titled "Yahoo!" (welcome to yahoo message), can I do something like:
webbrowser1.document.forms(0).("Yahoo!").click ?