Welcome Guest Search | Active Topics | Sign In | Register

Webrowser click to href with javascript Options
Bobes
Posted: Friday, November 6, 2015 6:17:12 AM
Rank: Newbie
Groups: Member

Joined: 11/6/2015
Posts: 1
Hi,
I need help with programmatically click to href with javascript.

Example:
...
<td role="gridcell" style="text-align:left;" title="26883301" id="1_s_1_l_Customer_Number" editable="false" class="" tabindex="-1" aria-labelledby=" s_1_l_altLink"><a role="textbox" href="javascript:void(0);" class="drilldown" name="Customer Number" tabindex="-1">26883301</a></td>
...

I can click to cell with this:

Dim TableElem As DOM.Element
TableElem = m_CurPage.WebView.GetDOMWindow().document.getElementById("1_s_1_l_Customer_Number")
If TableElem Is Nothing Then Exit Sub
m_CurPage.WebView.GetDOMWindow().document.getElementById("1_s_1_l_Customer_Number").InvokeFunction("click")

But it is not click to href.
Help me pls.
eo_support
Posted: Friday, November 6, 2015 8:59:45 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

The best way is to use WebView.EvalScript for this:

http://www.essentialobjects.com/doc/eo.webbrowser.webview.evalscript_overloads.aspx

As to what JavaScript code you should use to click an href, that would be a generic JavaScript programming question and it is beyond the scope of our support. However if you search online you should be able to find plenty of information about this.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.