|
-
September 19th, 2008, 11:14 AM
#1
target="_blank"
Here's a link to a Google Earth map:
HTML Code:
<!-- The full link (code supplied by Google)-->
<a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=merwin+ave,+cleveland+ohio&sll=37.0625,-95.677068&sspn=49.71116,59.414063&ie=UTF8&layer=c&cbll=41.488171,-81.685696&panoid=7Q2mWLjC1OLCkHJCCpdbeQ&cbp=1,256.01868693765914,,0,8.188362819652383&ll=41.504271,-81.706095&spn=0.005786,0.007253&z=14&source=embed" style="color:#0000FF;text-align:left" target="_blank">View Larger Map</a>
<!-- Some things <.CUT.> for readability -->
<a href="http://maps.google.com/maps?<.CUT.>;source=embed" style="<.CUT>" target="_blank">View Larger Map</a>
The target="_blank" did not exist in the original code supplied by Google. I added it because I want this link to open in a new window - but it doesn't - it opens in the same window. Why? How can I fix it?
-
September 19th, 2008, 12:42 PM
#2
Re: target="_blank"
strange... I've tested the code with target="_blank" and it always opens in a new window in almost any browser. Without it, the link opens as configured in web browser by default (if none is set - it's the same window)
Just tested in: Firefox 3.0.1, Opera 9.52, Google Chrome 0.2.149.29, Internet Explorer 7.0.6001.18000, Safari 3.1.2, Flock 1.2
Last edited by Xeel; September 19th, 2008 at 12:45 PM.
Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?
I had a nightmare last night. I was dreaming that I’m 64-bit and my blanket is 32-bit and I couldn’t cover myself with it, so I’ve spent the whole night freezing. And in the morning I find that my blanket just had fallen off the bed. =S (from: bash.org.ru)
//always looking for job opportunities in AU/NZ/US/CA/Europe :P
willCodeForFood(Arrays.asList("Java","PHP","C++","bash","Assembler","XML","XHTML","CSS","JS","PL/SQL"));
USE [code] TAGS! Read this FAQ if you are new here. If this post was helpful, please rate it!
-
September 19th, 2008, 01:16 PM
#3
Re: target="_blank"
 Originally Posted by Xeel
strange... I've tested the code with target="_blank" and it always opens in a new window in almost any browser. Without it, the link opens as configured in web browser by default (if none is set - it's the same window)
Just tested in: Firefox 3.0.1, Opera 9.52, Google Chrome 0.2.149.29, Internet Explorer 7.0.6001.18000, Safari 3.1.2, Flock 1.2
Are you saying you tested the actual code I provided and it did work correctly? It doesn't work for me in either Firefox 3.0.1 or IE 6.0.2900.2180.
-
September 19th, 2008, 03:36 PM
#4
Re: target="_blank"
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
September 19th, 2008, 04:34 PM
#5
Re: target="_blank"
Your link works exactly as expected for me on Firefox 3 and Safari 3 on a Mac.
-
September 19th, 2008, 05:07 PM
#6
Re: target="_blank"
just to be sure, use this =):
HTML Code:
//add this to your default attached js
function targetBlank(url){
window.open(url, '_blank', 'menubar=yes, toolbar=yes, location=yes, directories=yes, fullscreen=no, titlebar=yes, hotkeys=yes, status=yes, scrollbars=yes, resizable=yes');
}
//then you just use this method instead of target="_blank"
<a href="#" style="..." onclick="targetBlank('http://maps.google.com/maps...')">View Larger Map</a>
Don't tell me this does not work either.
Btw, I was going to write an article on some related subject. It's supposed that XHTML standard doesn't have target attribute for <a>. From the moment I saw this I've been wondering how we should avoid it if we want both: be able to open a new browser window, and our websites to correspond WCAG-AAA, where it's said our web pages should work without js. Actually what I understood was that WCAG-AAA is a perfect standard for text web browsers...
This is not flud, I'm just thinking aloud...
Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?
I had a nightmare last night. I was dreaming that I’m 64-bit and my blanket is 32-bit and I couldn’t cover myself with it, so I’ve spent the whole night freezing. And in the morning I find that my blanket just had fallen off the bed. =S (from: bash.org.ru)
//always looking for job opportunities in AU/NZ/US/CA/Europe :P
willCodeForFood(Arrays.asList("Java","PHP","C++","bash","Assembler","XML","XHTML","CSS","JS","PL/SQL"));
USE [code] TAGS! Read this FAQ if you are new here. If this post was helpful, please rate it!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|