Rank: Newbie Groups: Member
Joined: 8/3/2015 Posts: 3
|
Hi Guys,
just purchased the EO Web browser product and just getting my head around it all..
question about getting a synchronous string back from vb.net
eg: javascript requests a list of printer names from vb.net VB gets request, creates a string and sends it back When received back in javascript, the result is “null”
javascript call: var result = eoWebBrowser.extInvoke("getPrinters", "")
Vb.net Public Function WebView_JSExtInvoke(sender As Object, e As JSExtInvokeArgs) As String If e.FunctionName = "getPrinters" Then Dim printers As String = getPrinterNames()
Return printers End If
End Function
the plumbing all works fine, just the result comes back as "null" I'm hoping it all makes sense and someone can help me out..
many thanks, Pouya
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
You would return value to the JavaScript by setting e.ReturnValue in your event handler, not by returning a value from your event handler function.
Thanks!
|
Rank: Newbie Groups: Member
Joined: 8/3/2015 Posts: 3
|
Perfect - thank you!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
You are welcome. Please feel free to let us know if there is anything else.
Thanks!
|