473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

<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/For...p-net/200604/1
Apr 10 '06 #1
5 3951
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?

Apr 10 '06 #2
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/For...p-net/200604/1
Apr 10 '06 #3
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/For...p-net/200604/1

Apr 10 '06 #4
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/For...p-net/200604/1
Apr 10 '06 #5
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/lib...rs(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/For...p-net/200604/1

Apr 10 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Sugapablo | last post by:
I admit, I'm terrible creating reg ex's. I'm trying to create a preg_replace that would remove from a <a href> tag that would replace the target attribute regardless of what the value might be....
12
by: Romain | last post by:
Hi, I've used an excellent way to make target="_blank" links that still validate while using HTML 4.01 Transitional doctypes in the past. I learned the trick from :...
1
by: Nick Messick | last post by:
I'm going through some old code and have found this a number of places. Seems kind of strange. Is there any reason why someone would do this?
16
by: St. Rechsteiner | last post by:
Hi How i made the same effect in xHTML like the - target="_blank" - Tag in HTML 4.01? I will use it with xHTML and CSS ... but the validator say's to me, that this tag wasn't valid for xHTML!...
6
by: Tony Marston | last post by:
The code <a href="..." target="_blank">...</a> will not validate as XHTML STRICT because of the 'target' tag, so how do I achieve the same result by moving it to a CSS file? I cannot find anything...
2
by: Matt | last post by:
In the following code, page1.asp is inside the frame of main.html. When the user click submit button in page1.asp, it will submit the form and open a new window called page2.asp. When the user...
10
by: Dieter Salath? | last post by:
Hi, in our webpage, a user could open a windows explorer to his temp directory with a simple link and usage of the file protocol: <a href="file://C:\temp" target="_blank">C:\temp</a> This...
8
by: msnews.microsoft.com | last post by:
I want to redirect the user to a url outside of our website but I want it to preserve our application's window by opening a new window. We have a datagrid that has five hyperlink columns containing...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.