hi,
here is the source code from the web page:
two innocent radio butonswhere by default r1 is selected and r2 is not. to turn that around, the code needs to check r2 (1) and uncheck r1 (0).
the code as written bugs out at "f1.Checked = 0" because both inputs have the same name. i have tinkered with this with 1000 variations hacking away, but can't find the tweak to account for the same name business.
any thoughts are welcome.
TIA!
tx
here is the source code from the web page:
Code:
<html>
<body>
<form name="Form" method="get" action="abc.htm" id="Form">
<table id="radio" border="0">
<tr><td>
<input id="r1" type="radio" name="asd" value="N" checked="checked"/><label for="r1">R1</label>
<td>
<input id="r2" type="radio" name="asd" value="Y" /><label for="r2">R2</label>
</tr>
</table>
</form>
</body>
</html>
two innocent radio butonswhere by default r1 is selected and r2 is not. to turn that around, the code needs to check r2 (1) and uncheck r1 (0).
Code:
Sub test3()
Dim strtest
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.navigate "http://equitytoincome.com/radio.htm"
Do Until .readyState = 4
DoEvents
Loop
Set f1 = .document.all.Item("asd")
f1.Checked = 0
Set f2 = .document.all.Item("asd")
f2.Checked = 1
End With
End Sub
the code as written bugs out at "f1.Checked = 0" because both inputs have the same name. i have tinkered with this with 1000 variations hacking away, but can't find the tweak to account for the same name business.
any thoughts are welcome.
TIA!
tx