Quoting Jeffrey L. Taylor <[email protected]>:
> 
> 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

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to