I'm out of my depth with HTML. On this webpage I've been able to add the Username & Password but I can't figure out how to click on the Login Button.
This is the HTML code for the button:
<div class="loginbtn" onclick="DoLogin()" onmouseover="this.className = 'loginbtnon'" onmouseout="this.className = 'loginbtn'"><label name="lalogin" class="mousepointer">Login</label></div>
So far I've tried:
WB1.Document.getElementById("DoLogin()").Click
WB1.Document.frames("Frame1").Document.getElementById("loginbtn").Click
WB1.Document.getElementsByName("loginbtn").Click
WB1.Document.All("loginbtn").Click
and Strongm's code:
Dim oCol As IHTMLElementCollection
Set oCol = Form1.WB1.Document.All.tags("loginbtn")
For Each oelement In oCol
If InStr(oelement.className, "loginbtn") > 0 Then
oelement.Click
End If
Next oelement
End Sub
None of the above work. Any help with this would be much appreciated.
[gray]Experience is something you don't get until just after you need it.[/gray]
This is the HTML code for the button:
<div class="loginbtn" onclick="DoLogin()" onmouseover="this.className = 'loginbtnon'" onmouseout="this.className = 'loginbtn'"><label name="lalogin" class="mousepointer">Login</label></div>
So far I've tried:
WB1.Document.getElementById("DoLogin()").Click
WB1.Document.frames("Frame1").Document.getElementById("loginbtn").Click
WB1.Document.getElementsByName("loginbtn").Click
WB1.Document.All("loginbtn").Click
and Strongm's code:
Dim oCol As IHTMLElementCollection
Set oCol = Form1.WB1.Document.All.tags("loginbtn")
For Each oelement In oCol
If InStr(oelement.className, "loginbtn") > 0 Then
oelement.Click
End If
Next oelement
End Sub
None of the above work. Any help with this would be much appreciated.
[gray]Experience is something you don't get until just after you need it.[/gray]