Topic: Import/Call Ruby or .rb file using Javascript code

Is there any statement or command to call the ruby or .rb file in the javascript program ?
I want to call ruby file in the javascript code and execute that file.

Vishnu

Re: Import/Call Ruby or .rb file using Javascript code

Javascript is client side, Ruby is server side - it isn't possible. Can you be more specific on what you are trying to do? Perhaps there is an alternative.

Railscasts - Free Ruby on Rails Screencasts

Re: Import/Call Ruby or .rb file using Javascript code

Thanks ryanb.

I have a screen which do have four frames. Each frame  have specific information to display.
Like one frame to display the RSS information which user entered. Another frame is to display the weather information. Like wise all the four frames are used to display information.

I have created frames using javascript in the screen. Now i have to get the information into these frames as per user inputs. All my server side programming is done using ruby.

Any solution ?

Warm Regards,
Vishnu

Re: Import/Call Ruby or .rb file using Javascript code

Is AJAX what you want to use? This sends a request to the web server in the background so in a sense it does execute a Ruby script using Javacript.

If you want to do AJAX, I recommend you look into Prototype and RJS (Rails javascript helpers).

Railscasts - Free Ruby on Rails Screencasts