Skip to main content

Call javafx function from javascript

2 replies [Last post]
brandonroubi
Offline
Joined: 2009-02-07
Points: 0

Hi,
I look for an example of communication between javascript and javafx.
How to call javafx function from javascript ?
I find the follow package com.sun.javafx.runtime.liveconnect, but I don't know how to use it.
thank for you help and please excuse me for my bad english.

Best regards,
Pancho

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dojabr
Offline
Joined: 2003-06-16
Points: 0

Well, if it's any help ... here's how you do the reverse, calling javascript from fx.

var applet: Applet = FX.getArgument("javafx.applet") as Applet;

// Get JSObject instance
var window = netscape.javascript.JSObject.getWindow(applet);

// Invoke JSObject.call function passing the table data as argument
window.eval("alert('it worked');")

wsnyder6
Offline
Joined: 2004-04-20
Points: 0

Never used it myself, but a quick google reveals this thread which details the feature and provides links to the docs

http://www.google.com/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fw...