Hi all,
from inside my controller I need to do something like the following:
render :file =>‘my_view’,:target=>‘blank’
How could I do this?
Thanks
Hi all,
from inside my controller I need to do something like the following:
render :file =>‘my_view’,:target=>‘blank’
How could I do this?
Thanks
Rafael R. wrote:
Hi all,
from inside my controller I need to do something like the following:
render :file =>‘my_view’,:target=>‘blank’How could I do this?
You’d have to put the target attribute on the link tag that brings up
that page. By the time you get to the controller, it’s too late (well,
you could use JS, but why?).
Thanks
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
Rafael R. wrote:
Hi all,
from inside my controller I need to do something like the following:
render :file =>‘my_view’,:target=>‘blank’How could I do this?
Thanks
Also…this is usually not a good idea from a UI perspective. Most
browsers easily allow the user to open a plain link in a new window.
However, they tend not to make it easy for the user to force opening a
target=“_blank” link without a new window.
This means that target=“_blank” forces the user to accept a
proliferation of windows, whereas plain links give him more options.
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs