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.
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.
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 Murphy <rails-mailing-l...@andreas-s.net>
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?
Frederick Cheung wrote:
Neither. Pure javascript here.
you can call window.close to close yourself, and if on the parent you have <script type="text/javascript"> function fromChild(s){ alert("hello from parent" + s) } </script>
Then you can call parent.fromChild(...)
Fred