Open new window


#1

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


#2

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’:

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


#3

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