开发者

Calling ruby from javascript

开发者 https://www.devze.com 2023-03-27 05:17 出处:网络
Is there a way to call a jruby function from javascript, let\'s say that I need my user interface to be on the browser side.

Is there a way to call a jruby function from javascript, let's say that I need my user interface to be on the browser side.

Note: I'm not using Ruby on Rails

~ Eder 开发者_StackOverflow社区Quiñones


Short answer

No.

Long answer

You can create some server side application and call it through AJAX.

UPD

And yes: How do you create a Java applet using JRuby? :D


Not directly. But you can use AJAX to send a request to ruby code on the back-end. That code can then send data to the front-end in the AJAX response (for example, as JSON).

0

精彩评论

暂无评论...
验证码 换一张
取 消