Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » JSExecutor.executeJS with result(JSExecutor.executeJS with result)
JSExecutor.executeJS with result [message #882978] Thu, 07 June 2012 11:14 Go to next message
patins Missing name is currently offline patins Missing name
Messages: 1
Registered: June 2012
Junior Member
JSExecutor.executeJS(..) is of type void, but i want to evaluate some javascript expression which returns a string value. How to do that? I am in the UI thread, i.e. it was triggered by a button click in the webpage.

Concrete, i want to evaluate JSExecutor.executeJS("window.external.MyMethod()"),
MyMethod is actually implemented as .NET method of type "string", and the webbrowser is embedded in a C# form. I cant use a Browser widget as MyMethod is defined only for the outermost browser window, not for an iframe.
Re: JSExecutor.executeJS with result [message #885001 is a reply to message #882978] Tue, 12 June 2012 04:42 Go to previous message
Tim Buschtoens is currently offline Tim Buschtoens
Messages: 358
Registered: July 2009
Senior Member
Hi!


Am 07.06.2012 17:14, schrieb patins Mising name:
> JSExecutor.executeJS(..) is of type void, but i want to evaluate some
> javascript expression which returns a string value. How to do that? I am

This is currently not possible, the given JS is executed after, not
during the executeJS call. You can file an enhancement request in
bugzilla for this, but i cant say if and when it would be implemented.

You could probably use RAPs internal ajax infrastructure to get the
result to the server with the next http-request, but thats very hacky.

Greetings,
Tim


--
Tim Buschtöns

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Is it possible to use slide effect in RAP?
Next Topic:Some JavaScript based widget examples/spinn offs
Goto Forum:
  


Current Time: Thu Apr 24 15:02:56 EDT 2014

Powered by FUDForum. Page generated in 0.12979 seconds