Okay, thanks.  Thats what I thought and I have been trying that, but
I'm wondering, will this trigger the window action of the home
controller?  And do I just add a window view?  Is it possible to
populate that view dynamically within the popup ajax action?

On Mar 2, 9:01 pm, Greg Donald <gdon...@gmail.com> wrote:
> On Mon, Mar 2, 2009 at 7:03 PM, David <dly...@gmail.com> wrote:
>
> > Is it possible to create a new browser window popup with an ajax
> > call?
>
> Yup.
>
> > I want to open a new window and then trigger window.print()
> > like google docs and maps.  I know you can create new browser popups
> > with link_to by using :popup => ['new', 'height=300,width=300'], but I
> > don't think you can use it with link_to_remote.  Is there a way to
> > programmatically render some inline javascript?  I tried:
>
> >  window.open('test/popup'
> > 'mywin','left=20,top=20,width=500,height=500,toolbar=1,resizable=0');
>
> > But I was unable to load anything into the popup view.
>
> html:
>
> <%= link_to_remote 'Popup', :url => { :controller => :home, :action =>
> :popup } %>
>
> popup.rjs:
>
> page << "window.open('/home/window', 'mywin',
> 'left=20,top=20,width=500,height=500,toolbar=1,resizable=0' );"
>
> --
> Greg Donaldhttp://destiney.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to