Hello All,

I have a link. Which I want to open as a new window :-

<%= link_to "Google", "https://www.google.com", :popup =>
['new_window_name','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes']
%>

But it is opening in the same page....
Any suggestions how to do it ??
Even hover will be fine...

Thanks,
Avi

--
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.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/zMuhc6eQ6vsJ.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Alex Mercer at Dec 8, 2012 at 2:02 pm
    *link_to "GOOGLE", "http://www.google.com", **:class **=>* *"_blank"*

    On Saturday, December 8, 2012 9:15:00 AM UTC+2, Avi wrote:

    Hello All,

    I have a link. Which I want to open as a new window :-

    <%= link_to "Google", "https://www.google.com", :popup =>
    ['new_window_name','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes']
    %>

    But it is opening in the same page....
    Any suggestions how to do it ??
    Even hover will be fine...

    Thanks,
    Avi
    --
    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.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/t0HdG6bX_sAJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Avi at Dec 10, 2012 at 4:46 am

    On Saturday, December 8, 2012 7:32:39 PM UTC+5:30, Alex Mercer wrote:
    *link_to "GOOGLE", "http://www.google.com", **:class **=>* *"_blank"*

    I tried with *:class **=>* *"_blank". * It seems to be opening in the same
    page.

    On Saturday, December 8, 2012 9:15:00 AM UTC+2, Avi wrote:

    Hello All,

    I have a link. Which I want to open as a new window :-

    <%= link_to "Google", "https://www.google.com", :popup =>
    ['new_window_name','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes']
    %>

    But it is opening in the same page....
    Any suggestions how to do it ??
    Even hover will be fine...

    Thanks,
    Avi
    --
    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.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/7PgWGL7gWRcJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Walter Lee Davis at Dec 8, 2012 at 3:38 pm
    :target => '_blank' will do this.

    Walter
    On Dec 8, 2012, at 2:15 AM, Avi wrote:

    Hello All,

    I have a link. Which I want to open as a new window :-

    <%= link_to "Google", "https://www.google.com", :popup => ['new_window_name','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes'] %>

    But it is opening in the same page....
    Any suggestions how to do it ??
    Even hover will be fine...

    Thanks,
    Avi

    --
    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.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/zMuhc6eQ6vsJ.
    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.
  • Avi at Dec 10, 2012 at 4:47 am
    :target => '_blank' . It is opening in a different tab in the same browser.
    On Saturday, December 8, 2012 9:07:57 PM UTC+5:30, Walter Lee Davis wrote:

    :target => '_blank' will do this.

    Walter
    On Dec 8, 2012, at 2:15 AM, Avi wrote:

    Hello All,

    I have a link. Which I want to open as a new window :-

    <%= link_to "Google", "https://www.google.com", :popup =>
    ['new_window_name','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes']
    %>
    But it is opening in the same page....
    Any suggestions how to do it ??
    Even hover will be fine...

    Thanks,
    Avi

    --
    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 rubyonra...@googlegroups.com<javascript:>.
    To unsubscribe from this group, send email to
    rubyonrails-ta...@googlegroups.com <javascript:>.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/rubyonrails-talk/-/zMuhc6eQ6vsJ.
    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.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/Br_rYNpXEigJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Walter Lee Davis at Dec 10, 2012 at 4:53 am

    On Dec 9, 2012, at 11:47 PM, Avi wrote:

    :target => '_blank' . It is opening in a different tab in the same browser.
    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.

    Walter
    On Saturday, December 8, 2012 9:07:57 PM UTC+5:30, Walter Lee Davis wrote:
    :target => '_blank' will do this.

    Walter
    On Dec 8, 2012, at 2:15 AM, Avi wrote:

    Hello All,

    I have a link. Which I want to open as a new window :-

    <%= link_to "Google", "https://www.google.com", :popup => ['new_window_name','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes'] %>

    But it is opening in the same page....
    Any suggestions how to do it ??
    Even hover will be fine...

    Thanks,
    Avi

    --
    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 rubyonra...@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/zMuhc6eQ6vsJ.
    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.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/Br_rYNpXEigJ.
    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.
  • Avinash behera at Dec 10, 2012 at 4:56 am
    Should we use javascript ot jquery to achieve this?
    On Mon, Dec 10, 2012 at 10:23 AM, Walter Lee Davis 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.
  • Jim Ruther Nill at Dec 10, 2012 at 5:08 am

    On Mon, Dec 10, 2012 at 12:55 PM, avinash behera wrote:

    Should we use javascript ot jquery to achieve this?

    I remember in rails 2 that link_to has a popup option which opens a new
    window. Looking at
    the api right now, the option was removed. so I guess you may need to
    implement your
    own js solution

    http://apidock.com/rails/v2.3.8/ActionView/Helpers/UrlHelper/link_to

    On Mon, Dec 10, 2012 at 10:23 AM, Walter Lee Davis 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.



    --
    -------------------------------------------------------------
    visit my blog at http://jimlabs.heroku.com

    --
    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.
  • Jordon Bedwell at Dec 10, 2012 at 5:23 am

    On Sun, Dec 9, 2012 at 10:55 PM, avinash behera wrote:
    Should we use javascript ot jquery to achieve this?
    link_to(:link, :title => "Link Title", :onclick =>
    "javascript:(function(ele) { window.open(ele.href, ele.title,
    'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes')
    })(this); return false;")

    --
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedDec 8, '12 at 7:15a
activeDec 10, '12 at 5:23a
posts9
users5
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2022 Grokbase