Welcome Guest Search | Active Topics | Sign In | Register

JSExtInvokeArgs.ReturnValue Property Options
howard s
Posted: Friday, May 2, 2014 6:17:24 AM
Rank: Newbie
Groups: Member

Joined: 5/30/2012
Posts: 6
I am having a problem similar to what is described here:
http://www.essentialobjects.com/Forum/postsm32938_Return-a-value-from-C-and-passing-object-to-Javascript.aspx


I am trying to return a value from .NET to javascript. I am returning a simple string value, but it is not

getting assigned. Here is the code I am using:

Private Sub WebView_InvokeFunction(sender As Object, e As JSExtInvokeArgs)
Dim lv_String1 As String = TryCast...(argument 0 from e variable to string following your example code)
Dim lv_String2 As String = TryCast...(argument 1 from e variable to string folowing your example code)
e.ReturnValue = "Hello from .NET:" & lv_String2
End Sub

And here is my invocation:
var lv_String = invokeFunction("Hello", "World");
alert(lv_String);

I know the function is getting called by the WebView because I can trap it in the debugger, but the alert

displays "undefined" Am I invoking correctly?

eo_support
Posted: Friday, May 2, 2014 9:28:00 AM
Rank: Administration
Groups: Administration

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

Your code looks fine. Please check the version of EO.WebBrowser.dll. We have fixed an issue similar to this. If your DLL version is older than 3.0.54, then please download the latest build from our download page and update to that build.

Please let us know if the new build works for you.

Thanks!
howard s
Posted: Saturday, May 3, 2014 6:45:08 AM
Rank: Newbie
Groups: Member

Joined: 5/30/2012
Posts: 6
That took care of it. Thanks so much for your prompt response.
eo_support
Posted: Saturday, May 3, 2014 9:24:55 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Glad to hear that! Please feel free to let us know if there is anything else!


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.