Passing parameters to a view and render in inline iframe on the same page


I'm developing a rails app and need to do the following.

My main page (main.html.erb) has a small form and a submit button.
Also it has an inline iframe.

When click the submit button I need to pass some parameters to another
content page (content.html.erb) to create dynamic contents and load
the content page inside main page's inline iframe.

(What a user sees is only the main page and iframe content changes on
submit button click)

How can I do with this Rails? I tried several ways and sometimes even
my browser crashed. Thanks for your comments in advance.