cancel
Showing results for 
Search instead for 
Did you mean: 

failed while inserting javascript

AndrzejSzady
Level 3
Hey, I'm trying to insert a modified (commented out one line) javascript function to a browser application. Done that two times before without a problem. This time I'm getting: Failed while inserting javascript method:Exception from HRESULT: 0x80020101-> in mshtml.HTMLWindow2Class.IHTMLWindow2_execScript(String code, String language) in BluePrism.ApplicationManager.HTML.clsHTMLDocument.InsertJavascriptFragment(String MethodDefinition, String& sErr) Anyone's got an idea what's it about? Thanks
6 REPLIES 6

Anonymous
Not applicable
It seems the error is occurring because you selected the incorrect element to insert JavaScript fragment. Identify the body of the html page as an element and insert JavaScript to that element.Also ensure that your JavaScript code is working fine.

Anonymous
Not applicable
It seems the error is occurring because you selected the incorrect element to insert JavaScript fragment. Identify the body of the html page as an element and insert JavaScript to that element.Also ensure that your JavaScript code is working fine.

AndrzejSzady
Level 3
Hey, Thanks for reply. The code works fine in the browser's console. Still getting the same error after inserting it to BODY element though. The function I'm trying to modify and insert is assign to a button's ""onclick="" if it makes any difference.

AndrzejSzady
Level 3
UP, anyone?

AlexanderBopp
Level 4
I'm struggeling with the same getting the exception: BluePrism.ApplicationManager.HTML.clsHTMLDocument.InvokeJavascriptMethod(String methodname, String jsonargs, Object& retval, String& sErr) Any progress or hint on how a javascript function can be inserted and then invoked? thank you very much 

Anonymous
Not applicable
I am also facing same issue while invoking javascript. Please guide me if any solution is availbale.