Bret Waldow wrote:
Bear Bibeault wrote:Not directly. You can use an Ajax request to fire off a server-side resource to execute it.
Thanks.
I'm interested in more ideas like this, but I'm also interested in doing it without any server.
I'd like to know if there is a way I can call that library without any server, as a browser will let me load and run local content from the file system without one - and the browser includes a Javascript engine to run locally based code. I want to leverage the substantial abilities current browsers have to work with local content for a browser-based application.
I know the user can load files from the local system without a server. Can I access a local system library without a server? Can I get a remote page from the internet in another tab, and drag content off it to another locally stored page? This seems likely, as I can copy images off a web page from Firefox and save them.
I might also find reason to have a server for some other functionality as I develop my application, but knowing the limits of Javascript will be helpful, so I'd like to hear about both approaches - with and without.
Cheers,
Bret
If you can use your library within JNI, is it possible for you to wrap the libraries into RMI (Remote Method Invocation), or a network service, (or xmlrpc web services or something else) and allow it to be called by Java
Applet (or xmlHttpRequest Object) in a webpage? (Java Applet or xmlHttpRequest Object have their own security limitations, too.)
If you target for ie as your webbrowser, you have an alternative choice, compile it as ActiveX dll component. And you can call it by <object></object> tag and access it using Javascript.
Moreover, you are not allow to access local system's resources (other than webpages, multimedia files and files that opened by webbrowser's plugin or add-ons) directly from Javascript due to security reasons. Thus, it's quite IMPOSSIBLE to call an external library directly from javascript.