Ruby on Rails Sunday, December 9, 2012

On Dec 9, 2012, at 11:55 PM, avinash behera wrote:

> Should we use javascript ot jquery to achieve this?

I just tried this in Safari, and both window.open and target="_blank" both open in a new tab. There doesn't seem to be a way to override the browser preference here (and I consider that to be a good thing, BTW).

What does seem to work to force a different window altogether is to set the window preferences in JavaScript to a defined size. Compare the second and the third links on this page. The second (like the first) opens a new tab. The third opens a little daughter window, separate from the main browser. I haven't fiddled with it that much to figure out what the least-common-denominator thing you can do to force the window, but you should be able to find a lot of references to this -- it's definitely old-school.

http://scripty.walterdavisstudio.com/window.html

You might also want to think about using a "lightwindow" or similar instead of a new window. New windows have lots of other UX issues.

Walter

>
> On Mon, Dec 10, 2012 at 10:23 AM, Walter Lee Davis <waltd@wdstudio.com> wrote:
> That's an implementation detail of your browser. The target="_blank" bit is baked into every browser back to Netscape 2. How that browser chooses to implement the window (or tab) is its concern, not something you can change
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment