0

I have a form. Consider i have a button in my form and what i need to do is execute the ruby file when i click on the button. Actually my ruby file writes data to a html file. So i also wanted to open that file in the frame when clicking on the button.

1 Answer 1

1

Make the button a submit button. Put it inside a <form>. Set the action of the form to a URL that your webserver maps onto the Ruby program. (You'll need to pick an interface that your program will conform to, e.g. CGI or Rack). Since you are playing with frames, also set the target attribute of the form.

Either change the output of the Ruby program so it outputs to the web server instead of a file, or set it to send an HTTP Redirect to the location you saved the file to.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.