A quick question on popup windows

How the hell do you close em off after the action is completed?
Ta,
Eric

I’m curious as to how to close a browser window opened as

<%= link_to(image_tag(“new_organisation.png”, :alt => ‘New’, :border =>
1), { :controller => ‘to_dos’, :action => ‘to_do_pop_up’}, :popup =>
[‘new_window’, ‘height=500,width=800’])

which performs exactly as desired within the controller on submit

And my question is =>

after the record is processed…

flash[:notice] = ‘Note was successfully created.’
if !(params[‘id’] == nil)
redirect_to :action => ‘job_dashboard’, :id => @job
else
render WHAT??? <— THIS LINE NEEDS TO CLOSE THE POP_UP
end

Eric S. wrote:

render WHAT???    <--- THIS LINE NEEDS TO CLOSE THE POP_UP

end

render :text => “”

Thanks Jim - that was exactly what I needed. I figured there had to be
some render method to do that - I’d never have figured render :text tho.
Thanks again.
Cheers,
Eric.

Eric S. wrote:

Thanks Jim - that was exactly what I needed. I figured there had to be
some render method to do that - I’d never have figured render :text tho.
Thanks again.
Cheers,
Eric.

Well, the render :text => “string” just renders the plain text,
or sting - which happens to be a bit of JavaScript. If a user has
JavaScript disabled in the browser, it won’t work.

Can’t… The only way to control a user’s browser is with javascript.
Welcome to the
wonderful world of web programming!

b

Well, in my current case, I have control over whether JS is enabled - so
that’s OK. But out of interest how would we close the window otherwise?

Bugger!
Thanks Guys