Welcome Guest Search | Active Topics | Sign In | Register

EvalScript error Options
TK
Posted: Wednesday, December 2, 2020 2:54:42 AM
Rank: Member
Groups: Member

Joined: 4/10/2016
Posts: 14
Dear

My application has 2 webviews named view1 and view2. I use RegisterJSExtensionFunction in view1 to register a javascript function to get user's input and then process it and use EvalScript to output in view2. All these work fine in the 2019 version. But after upgraded to the latest version, it throws JSInvokeException when I call EvalScript on view2.

eo_support
Posted: Wednesday, December 2, 2020 4:31:22 PM
Rank: Administration
Groups: Administration

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

Make sure you do not call EvalScript while inside your JavaScript extension function. Please see here for detailed explanation why this is no longer allowed:

https://www.essentialobjects.com/forum/postst11933_Return-Result-From-QueueScriptCall-Inside-RegisterJSExtensionFunction.aspx

You can use QueueScriptCall instead EvalScript like in the code in the above link to change your code to asynchronous (The code in the above link doesn't work because while it uses QueueScriptCall, it also tries to use WaitOne to wait for it to finish and get the call result, which is not possible from within a JavaScript extension function).

Hope this helps. Please feel free to let us know if you still have any more questions.

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.