Closing popup


#1

Hi,
i’m using popup in my application when i have to use a form to submit
some data:

link_to “Add”, {:action => “add_customer”}, :popup => [‘new’,
‘height=300,width=300’]

When i push submit i like that the popup closes and refresh the main
page that show the list of data.

thanks

claudio


#2

this is really a javascript question. off the cuff, what i would do
is submit the form. if the form data was successfully processed, use
some javascript to redirect the parent window to the location you want
then close the child window. if it failed, just redisplay the form in
the child window.

I’ll leave the implementation up to you.


#3

thanks
claudio


#4

hi,

I have to implement a similar functionality, how did you do it finally?

Claudio C. wrote:

thanks
claudio


#5

Can someone help me also to work out this scenario…
from a main window, i open a popup, then submit the popup, do some
server side call, after this i close the popup window and now i need to
update a DOM in my main window.
How can i acheive this or should i be looking for any other way.

Thanks in advance
Neha


#6

Greg D. wrote:

On 2/1/08, Neha C. removed_email_address@domain.invalid wrote:

Can someone help me also to work out this scenario…
from a main window, i open a popup, then submit the popup, do some
server side call, after this i close the popup window and now i need to
update a DOM in my main window.
How can i acheive this or should i be looking for any other way.

window.opener.location.reload();


Greg D.
http://destiney.com/

The problem is i cant reload the whole of the main window, i just have
to update a div.


#7

On 2/1/08, Neha C. removed_email_address@domain.invalid wrote:

Can someone help me also to work out this scenario…
from a main window, i open a popup, then submit the popup, do some
server side call, after this i close the popup window and now i need to
update a DOM in my main window.
How can i acheive this or should i be looking for any other way.

window.opener.location.reload();


Greg D.
http://destiney.com/