Quoting Jeffrey L. Taylor
<ror-f/t7CGFWhwGcvWdFBKKxig@public.gmane.org>:>
> What is the difference between these two:
>
> render :js => "window.open(''#{url}'')
>
>
> and
>
> render :update do |page|
> page << "window.open(''#{url}'')
> end
>
>
> TIA,
> Jeffrey
Actually, I am trying to update a element in a frame and open a new window wit
a specific URL. The HTML is:
<%=link_to_remote article.title,
:url => {:controller => ''three_pane'', :action =>
''click'', :id => article},
:complete => ''eval(request.responseText)'' %>
The render in the action is:
render :update do |page|
page << "window.open(''#{article.url}'')"
page <<
"parent.feeds.document.getElementById(''#{dom_id(article.feed)}'').update(''#{content}'');"
end
The preceding code does the update AND opens two windows to article.url. The
following code opens only one window, but doesn''t do the update.
render :js => "window.open(''#{article.url}'')"
I don''t understand what''s going on.
TIA,
Jeffrey