Pradeepta Swain wrote:
How can i call a ruby program from java script . I want to
run a ruby program that will post form data on button click .And also
how can I sent username , password form field's data to a servlet
?Anybody plz help !!!
I read the 3 postings (with different titles) that you made recently
on this subject. In the previous post, you mentioned 'req.set_form_data'
(like you were writing a web service client), now you say that you are
It would help if you clarified this: where is the 'ruby program' that
you are trying to call? I have the suspicion that you are trying to call
a ruby program that is in the computer where the browser is (and you
cannot do that).
Or do you mean that the 'ruby program' is in the server? in this case
the method post, the input fields for user name and password, and the
submit button; there is no 'programming' to do). On the server side (I
assume that you are not using Rails), you write a simple Ruby program
which uses CGI to collect the form parameters (and that is presumably
the same program that sent the form).
However I see that in the first post you mentioned a (Java?) 'servlet',
so it would seem that the server is already taken care of..
I just wanted to explain why you are getting different answers every
time, as everyone is giving a different interpretation to your question.
Posted via http://www.ruby-forum.com/.