# Closing the pop-up window after submitting the form

**URL:** <https://www.ruby-forum.com/t/closing-the-pop-up-window-after-submitting-the-form/88637>\
**Category:** Rails\
**Created:** [March 13, 2007, 8:58am UTC](https://www.ruby-forum.com/t/closing-the-pop-up-window-after-submitting-the-form/88637 "2007-03-13T08:58:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![deepa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/91b2a8/32.png) [@deepa](https://www.ruby-forum.com/u/deepa)\
**Post date:** [March 13, 2007, 8:58am UTC](https://www.ruby-forum.com/t/closing-the-pop-up-window-after-submitting-the-form/88637/1 "2007-03-13T08:58:51Z")

</div>

Hi all,  
I am poping up a window by  
\<%= link\_to(image\_tag(…), :action =\>“sample”, :popup =\>  
[‘new\_window’]) %\> as I want the action “sample” to be performed and the  
result should be displayed in the pop up. In the pop up window  
say,“sample.rhtml”, I have one submit button. I want this pop up to be  
automatically close after submitting the form’s text value to another  
action. I have tried “onsubmit” in start\_form\_tag and form\_remote\_tag.  
But its not working.Please help.

Thanks,  
Deepa
