Use javaScript to click on a link
-
wrote on 27 Feb 2015, 12:34 last edited by
In examples browser,I want to click a link automaticly.
In Qt5.0,
call
evaluateJavaScript("document.getElementById('dd').click();");
on
<a id="dd" href="http://qt-project.org">DD</a>
It works fine.I can open the link in the same tab.But when I run the same code on
<a id="dd" href="http://qt-project.org" target="_black">DD</a>
nothing happened.in Qt 4.0,everything is fine,I can open the link, with or without target="_black"
-
wrote on 2 Mar 2015, 16:38 last edited by
You probably wanted target="_blank"
or you don't have frame with that name "_black"
or due to security restrictions originating frame (e.g. main frame) doesn't have access to the other frame ( "_black")
2/2