How to render a template in a popup window from a controller action?

I’m trying to render a template in a popup window from a controller
action. it would be equivalent to:

<%= link_to ‘Manage Documents and Photos’, { :action =>
‘manage_photos_documents_popup’ }, :popup => [ ‘Manage Photos and
Documents’, ‘width=550, height=600’ ] %>

except instead of opening the popup when the user clicks on a link, it
would happen in response to a statement in a controller.

I tried using an xhr request with something like:

render :update do | page |
page << “window.open(this.href,‘Manage Photos and
Documents’,‘width=550, height=600’);return false;”
end

but with no result.

Any suggestions for how to do this?

Thanks.