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
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.