Move data from popup back to main window

Anyway to do this without using an rjs file? Otherwise, I’m guessing
AJAX is the only way.

You can reload the main window. You can do this by redirecting to the
action that displays the main window after processing the popup post
request.

On Jan 9, 11:47 am, Corey M. [email protected]

On 9 Jan 2008, at 17:48, eggman2001 wrote:

You can reload the main window. You can do this by redirecting to the
action that displays the main window after processing the popup post
request.

On Jan 9, 11:47 am, Corey M. [email protected]
wrote:

Anyway to do this without using an rjs file? Otherwise, I’m guessing
AJAX is the only way.

the child window can call functions from the parent window. I’ve got
an app where the user can open a popup window, do some searching and
when they’ve found something they like the look of, the button they
click just does parent.some_function(…)

Fred

eggman2001 wrote:

You can reload the main window. You can do this by redirecting to the
action that displays the main window after processing the popup post
request.

On Jan 9, 11:47 am, Corey M. [email protected]

This I’ve tried and the redirect ends up loading the correct screen but
instead of refreshing or loading it in the main window, it loads it in
the popup window instead. Here is the code:

def processSelection
if request.post?
id = params[:id]
redirect_to(:controller => ‘screens’, :action => :new, :bbID => id)
end
end

Am I doing something wrong?

On 9 Jan 2008, at 18:44, Corey M. wrote:

On Jan 9, 11:47 am, Corey M. [email protected]
Fred

Are you just calling a method/function in the controller of the
parent?
Or are you actually posting form data to some method? I guess it
wouldn’t matter, but either way you have to somehow close the popup.

Neither. Pure javascript here.

you can call window.close to close yourself, and if on the parent you
have

Then you can call parent.fromChild(…)

Fred

Frederick C. wrote:

On 9 Jan 2008, at 17:48, eggman2001 wrote:

You can reload the main window. You can do this by redirecting to the
action that displays the main window after processing the popup post
request.

On Jan 9, 11:47 am, Corey M. [email protected]
wrote:

Anyway to do this without using an rjs file? Otherwise, I’m guessing
AJAX is the only way.

the child window can call functions from the parent window. I’ve got
an app where the user can open a popup window, do some searching and
when they’ve found something they like the look of, the button they
click just does parent.some_function(…)

Fred

Are you just calling a method/function in the controller of the parent?
Or are you actually posting form data to some method? I guess it
wouldn’t matter, but either way you have to somehow close the popup.