heirloomjewellery Posted October 4, 2004 Posted October 4, 2004 Hi Another stupid question from a complete layperson.... Can anyone tell me what I have to add to my HTML code so that when I click on a thumbnail image it opens a new window? I'm dumb I know, and really can't work it out - can anyone help? Cheers! Sarah Quote
TCH-Bruce Posted October 4, 2004 Posted October 4, 2004 (edited) You can add the following to your thumbnail link: target="_blank" You can view more info at this link: http://www.w3schools.com/tags/tag_a.asp And wecome to the family! Edited October 4, 2004 by TCH-Bruce Quote
heirloomjewellery Posted October 4, 2004 Author Posted October 4, 2004 Oh thanks Bruce! You're a star - and thanks for the welcome! Cheers! Quote
borfast Posted October 4, 2004 Posted October 4, 2004 Welcome to the family! Being (one of) the standards geek around here (or at least the one on duty, at this moment ), I should warn you that target="_blank" is going to be deprecated in future versions of HTML, which means it will probably stop working on newer browsers in a few years, so if you're making a page that you want to hold for a long time, you should take that into consideration. Besides, many people just hate new windows opening up without their explicit request - think pop-up blockers Quote
TCH-Thomas Posted October 4, 2004 Posted October 4, 2004 it will probably stop working on newer browsers in a few years Which command will be there instead of target="_blank" if you want a new window to open? Quote
LisaJill Posted October 4, 2004 Posted October 4, 2004 There won't be, short of using javascript (which would be a lameo way to get around the standards, according to the real zealots I tend to agree...) The idea is that control of windows should be in the hands of the person browsing, not the person creating the website. (this is an oft debated and "hot" topic, if you want to read about it, google target="_blank" or something similar... =) ) Quote
TCH-Bruce Posted October 4, 2004 Posted October 4, 2004 Just to clarify, I wasn't condoning the use of the "target=_blank" I was just answering the question. I myself create popup windows using javascript that require a user to click a link stating to display a larger image. Quote
TCH-Don Posted October 5, 2004 Posted October 5, 2004 Welcome to the Family heirloomjewellery and your new home! We really are like family here. So if you need anything, just ask your new family! We love to help Quote
TCH-Thomas Posted October 5, 2004 Posted October 5, 2004 There won't be, short of using javascript (which would be a lameo way to get around the standards, according to the real zealots I tend to agree...) The idea is that control of windows should be in the hands of the person browsing, not the person creating the website. (this is an oft debated and "hot" topic, if you want to read about it, google target="_blank" or something similar... =) ) I think its bad to remove the "target=_blank" function. Because if I link to lets say Lisas site then with "target=_blank" the visitor can check out Lisas site but at same time not leave my site for further reading. If Lisas site opens in my sites window, clearing out me, and then decides it wants to go back to mine to continue reading, it will be a lot of go back and forth for the visitor. Another thing I often do when coming to a page with several links is to open all in new windows/tabs, finish them site by site. For both of these scenarios, the website owner would have to have a text saying "Please right click the links and open them in new windows" Not very handy. Lisa, you mention javascript? What script is that? I have never seen a javascript open a new window. Quote
LisaJill Posted October 5, 2004 Posted October 5, 2004 The idea here is that if someone wants to visit a site not on the current site, they have a host of options to open it in a new window, including cmd or ctrl click, right click -> open in new window, etc. This is up to THEM not up to you - visitors always had a choice, by adding that target you remove their choice. (in some browsers anyway) But here is not a proper venue for this argument, it's been done over and over and over and none of US (that I know of) have a say in the standards - anyway, it's already deprecated. =) Lots of javascripts can do it, but I don't code javascript. Google for "javascript open link in new window" and you'll have about 30 pages of 'em. =) Quote
TCH-Don Posted October 5, 2004 Posted October 5, 2004 as an alternative you could have a link followed by (new window link) like click here to see the site (open in new window) ? Quote
TCH-Thomas Posted October 5, 2004 Posted October 5, 2004 as an alternative you could have a link followed by (new window link) like click here to see the site (open in new window) ? No, I agree Lisa, this might not be the place to discuss it, but if several discuss it anywhere, there might be someone who can bring this to attention to the correct people. And whats better than discussing things with a knowledgeable family? Sorry Don, I dont get it. You mean I should have 2 links one that clears my window and a second open in new? OR Link (Text: Open in new window)? Quote
TCH-Bruce Posted October 5, 2004 Posted October 5, 2004 Don is saying to have 2 links. One that opens in the current window and another that opens another window. As for the right people I think it's too late. It is still supported in the transitional DTDs but not the strict XHTML DTD. Everyone should know how to right-click on a link and tell it to open in a new window or tab (if the browser supports it). Quote
LisaJill Posted October 5, 2004 Posted October 5, 2004 It's been discussed about a million times in every conceivable location. For about a year, maybe two. =) Quote
LisaJill Posted October 5, 2004 Posted October 5, 2004 target="_blank"? google. there's probably better keywords, but there's a few arguments in there. Sorry Tompas, I'm exhausted and didn't mean to be blunt. =) But it's out there, has been since before I started with my new site in June '03. Quote
TCH-Thomas Posted October 5, 2004 Posted October 5, 2004 I'm exhausted and didn't mean to be blunt. =) No worries, I will still link to you. :hug: Now, get some sleep. Quote
LisaJill Posted October 5, 2004 Posted October 5, 2004 It's only 4:49pm, I can't sleep. I have three assignments due tomorrow. I'm just tired 'cos I just got back from horseback riding. =) Quote
!!blue Posted October 5, 2004 Posted October 5, 2004 I found this article interesting: www.sitepoint.com/article/1041 I think it's on the bleeding edge of the whole "opening a new window" topic. I don't mind opening new windows, but like to be forewarned via an icon, text, or something else. I use a CSS class that adds an icon before a link that opens in a new window on my blog. The above article uses an attribute for the link tag that I was unfamiliar with: rel along with some Javascript, but what if the user has JS turned off? Won't work. This debate could go on forever. New windows are great for showing artwork at larger sizes, maps, helpful text, instructions, etc. New windows are bad because they are, in effect, pop-ups and take control away from the user. I'll just patiently wait for the day when you can create a class of links that open in a new tab instead of a new window. THAT would rock. regards, !!blue Quote
LisaJill Posted October 5, 2004 Posted October 5, 2004 I read that the latest build of firefox (a nightly, not in distribution yet) has an option to open all external links in a new tab. Quote
mr_lucas Posted October 11, 2004 Posted October 11, 2004 now here is the answer to the window problem code written to the html ditors and browsers when creating a page, insted of (target= blank) you put (taget = ask) then when a browser answers with what was pre difined in the settings setting will have somthing like dont allow popups--- allow if host domain is diffrent from current--- allow all pop ups--- pompt me for answer--- text box list all domains that you wish not to have pop ups from ad. buy.me now in that pomt thing you have a button that says to "add to the ads list" and that will kill spam Quote
TCH-Bruce Posted October 11, 2004 Posted October 11, 2004 If they ever went with this scenario I would hope that the choices were block everything by default and let me add sites I will accept popups from. The list would be way shorter. Quote
mr_lucas Posted October 11, 2004 Posted October 11, 2004 well the option will have to be disscussed but the idea is sound Quote
criosa Posted October 25, 2004 Posted October 25, 2004 don't know if this is standards-compliant (I haven't actually finished anything to go over and check it lately), but sometimes I'll have my links open in a new window by using "target=linked"... since I'm not using frames, it opens in a new window, and if they don't close the window, everything targeted to it opens in that same window. so it's only mildly annoying. anyone know if they're going to take that trick away? I suppose since it's a frame window reference they can't. maybe. Quote
LisaJill Posted October 25, 2004 Posted October 25, 2004 Target= is deprecated, *frames* are deprecated. Can they take it away from standards? Yes. Will they stop the browsers understanding it? Not this decade; they keep them backwards compatible for a lonnnnnnnnnnnnnnnng time. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.