Hi, im working in a project where the user can click in any object in a webpage so i get that object and manipulate it. it is worlking fine in almost all webpages but in twitter login page my code is not working and i dont know why. When i insert the code "by hand" in the html it works perfectly but not in the .net program.
When the webpage is loaded, i insert this javascript code. As you can see , a "onmouseup" where i fill a variable that i will use later in the program
Code: Visual Basic.NET
this.WebView.EvalScript("var _ODI__objeto = 'aa'");
this.WebView.EvalScript("var h1 = document.getElementsByTagName('body')[0]; var att = document.createAttribute('onmouseup'); att.value = \"_ODI__objeto = event.target\"; h1.setAttributeNode(att); ");
this.WebView.EvalScript("function _ODI__getObject () { return _ODI__objeto };");
When the user clicks in the webpage, it triggers the click .net event and i get the clicked object.
Code: Visual Basic.NET
JSObject js = (JSObject)this.WebView.EvalScript(" _ODI__getObject();");
It works fine in most webpages but not in twitter login page, i think what happens is that the onmouse event is not fired because the variable _ODI_Objeto gets the 'aa' value in the second code.
How can i debug this?
EDITED::
I downloaded the twitter html login page and uploaded to my server and it works, so perhaps there is a problema with the time loading the page?
Thanks