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.
|
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.aspxAs 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!
|