In my HTML page, I simply have an input box and an output box.
The Ruby script I have simply extracts the value from the input box, calculates and needs to display the output in the output box.
How do I get this done in my HTML code?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try using Ruby as your CGI back-end. Here is a simple overview of what Ruby with CGI might be. You can also delve into the intro given by the Pragmatic Programmers here. So fo example:
if your HTML contains a form that has the field
someVal,then you can access it using Ruby’s cgi as:
To make it even more interesting, without using any special frameworks, you can use Ruby’s
erubyso that you directly embed your Ruby in HTML :-).Something like:
Gives something like:
This text is 100% Live!Try it out, I know you’ll love what you learn…