why isnt target="_blank" working????

Discussion in 'ASP .Net' started by Jon via DotNetMonster.com, Apr 10, 2006.

  1. <siteMapNode title="share price" description="Link to Netcall on the London
    Stock Exchange" url="http://www.yahoo.co.uk" role="" target="_blank" />

    Hi all

    I'm trying to open the Yahoo web site in a new window using the above code in
    my asp.net web.sitemap. I'm expecting the target="_blank" bit to make it do
    this. but it isnt. Does anyone know why??

    Thanks in advance.

    --
    Message posted via DotNetMonster.com
    http://www.dotnetmonster.com/Uwe/Forums.aspx/asp-net/200604/1
    Jon via DotNetMonster.com, Apr 10, 2006
    #1
    1. Advertising

  2. Not sure how this gets implemented, but if it uses client-side script
    to open the window then maybe it's being prevented by a popup blocker?
    Chris Fulstow, Apr 10, 2006
    #2
    1. Advertising

  3. Hey, thanks for replying but I wouldn't have thought it was that. The Yahoo
    web site does load up but not in new window. It loads up in the current
    window. No pop up messages are being displayed at all. I'm clueless to why
    it doesnt work????

    --
    Message posted via DotNetMonster.com
    http://www.dotnetmonster.com/Uwe/Forums.aspx/asp-net/200604/1
    dandrew22 via DotNetMonster.com, Apr 10, 2006
    #3
  4. Jon via DotNetMonster.com

    Patrice Guest

    For a start I would check the HTML code used to open the window. My first
    thought would be that this atttribute is just not used in the created HTML
    code... (which control do you use, a menu ?)

    --
    Patrice

    "dandrew22 via DotNetMonster.com" <u2272@uwe> a écrit dans le message de
    news: 5e916b96b7b64@uwe...
    > Hey, thanks for replying but I wouldn't have thought it was that. The
    > Yahoo
    > web site does load up but not in new window. It loads up in the current
    > window. No pop up messages are being displayed at all. I'm clueless to
    > why
    > it doesnt work????
    >
    > --
    > Message posted via DotNetMonster.com
    > http://www.dotnetmonster.com/Uwe/Forums.aspx/asp-net/200604/1
    Patrice, Apr 10, 2006
    #4
  5. Hey Patrice, thanks for replying.
    I have an asp.net menu control. Each heading in this control , when clicked,
    will load a new page. This new page will load in the current window (so
    never is a new window opened). Only one heading on the menu will load a new
    page and this is the sub-heading is 'share price' the following is the
    sitemap code for this:
    <siteMapNode title="share price" description="Link to Netcall on the London
    Stock Exchange" url="http://www.yahoo.co.uk" role="" target="_blank" />

    The other headings dont have the target="_blank" bit as they will load in the
    same window. But the above should load in a new window. I dont have any
    other code elsewhere for this. The sitemap has all the navigation code I've
    been using. If I need to have code elsewhere to open a new window then what
    will I need???

    Many thanks in advance.

    --
    Message posted via DotNetMonster.com
    http://www.dotnetmonster.com/Uwe/Forums.aspx/asp-net/200604/1
    Jon via DotNetMonster.com, Apr 10, 2006
    #5
  6. Jon via DotNetMonster.com

    Patrice Guest

    And have you tried to check the HTML code as suggested ? My guess is that
    this atttribute is not used by the menu control when generating the HTML
    code.

    From
    http://msdn2.microsoft.com/en-US/library/system.web.sitemapnode_members(VS.80).aspx,
    it looks that the SiteMapNode doesn't have the "target" attribute.
    For now it would be a custom attribute that is not used by the menu control.

    Once checked this is the case, you could inherit from the menu control to
    add this capability. (or perhaps use a js function that uses window.open in
    your site map).

    --
    Patrice

    "Jon via DotNetMonster.com" <u2272@uwe> a écrit dans le message de news:
    5e91e3de234ec@uwe...
    > Hey Patrice, thanks for replying.
    > I have an asp.net menu control. Each heading in this control , when
    > clicked,
    > will load a new page. This new page will load in the current window (so
    > never is a new window opened). Only one heading on the menu will load a
    > new
    > page and this is the sub-heading is 'share price' the following is the
    > sitemap code for this:
    > <siteMapNode title="share price" description="Link to Netcall on the
    > London
    > Stock Exchange" url="http://www.yahoo.co.uk" role="" target="_blank"
    > />
    >
    > The other headings dont have the target="_blank" bit as they will load in
    > the
    > same window. But the above should load in a new window. I dont have any
    > other code elsewhere for this. The sitemap has all the navigation code
    > I've
    > been using. If I need to have code elsewhere to open a new window then
    > what
    > will I need???
    >
    > Many thanks in advance.
    >
    > --
    > Message posted via DotNetMonster.com
    > http://www.dotnetmonster.com/Uwe/Forums.aspx/asp-net/200604/1
    Patrice, Apr 10, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. msnews.microsoft.com

    Redirect and Target="_blank"

    msnews.microsoft.com, Dec 31, 2003, in forum: ASP .Net
    Replies:
    8
    Views:
    25,048
    Al Cadalzo
    Jan 3, 2004
  2. ad
    Replies:
    4
    Views:
    7,020
    Yunus Emre ALPÖZEN [MCSD.NET]
    Jul 3, 2005
  3. Matt
    Replies:
    4
    Views:
    3,490
    Whitecrest
    Jun 1, 2004
  4. Webdesigner

    IE 6 hanging on target="_blank"

    Webdesigner, Jun 5, 2004, in forum: HTML
    Replies:
    5
    Views:
    761
    Whitecrest
    Jun 6, 2004
  5. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,845
    Smokey Grindel
    Dec 2, 2006
Loading...

Share This Page