Wednesday, March 28, 2012

why isnt target="_blank" working

<siteMapNode title="share price" description="Link to Netcall on the Londo
n
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 i
n
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 webservertalk.com
http://www.webservertalk.com/Uwe/Fo...sp-net/200604/1Not 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?
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 webservertalk.com
http://www.webservertalk.com/Uwe/Fo...sp-net/200604/1
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 webservertalk.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 webservertalk.com
> http://www.webservertalk.com/Uwe/Fo...sp-net/200604/1
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 Londo
n
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 th
e
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 webservertalk.com
http://www.webservertalk.com/Uwe/Fo...sp-net/200604/1
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/li...mapnode_members(VS.8
0).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 webservertalk.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 webservertalk.com
> http://www.webservertalk.com/Uwe/Fo...sp-net/200604/1

0 comments:

Post a Comment