Forum: Ruby on Rails Open new window

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Santiago Hirschfeld (Guest)
on 2006-01-17 08:32
(Received via mailing list)
First, I'm *very* new in rails, i'm loving it and didn't encounter any
problems in the simple tasks i'm doing yet.

What I'd like to do is to open a new window containing the info of a
Model
(something like the show scaffold method) with a simple "close" link to
close the window.

Can someone please give me some directions?

thanks in advance.


Santiago
Jens A. (Guest)
on 2006-01-17 10:14
(Received via mailing list)
On 16 Jan '06, at 9:54 PM, Santiago Hirschfeld wrote:

> What I'd like to do is to open a new window containing the info of
> a Model (something like the show scaffold method)

In HTML, you use a link whose target is '_new':
	<a href="......" target="_new">

In a Rails app you would use the HTML options hash of the link_to
method to set :target=>'_new'.

> with a simple "close" link to close the window.

Every window already comes with a standard "close" button at the top.
I've never understood why some web sites feel they need to add a
special link to help the user out.

But if you really want to do it, you'll need a bit of JavaScript to
close the current window, then make a link whose href is
"javascript:" followed by the script.

--Jens
kiran k. (Guest)
on 2007-10-02 17:58
Jens A. wrote:
> On 16 Jan '06, at 9:54 PM, Santiago Hirschfeld wrote:
>

>
> But if you really want to do it, you'll need a bit of JavaScript to
> close the current window, then make a link whose href is
> "javascript:" followed by the script.
>
> --Jens


Hi,

I am new to RoR I want to show a new window but as a popup window that
should not be shown on the taskbar, Please help me.........You can reply
me on my e-mail.


Regards,
Kiran P.,
removed_email_address@domain.invalid
This topic is locked and can not be replied to.