Jump to content

xhtml open in new window ?

Whether you're a seasoned veteran or a struggling beginner, Web Radiance is the web development and web design forum for you. You'll find answers to all your HTML, CSS, SEO, and Programming needs. Pull up a chair and stay awhile.

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • This topic is locked

xhtml open in new window ? Rate Topic: -----

#1 User is offline   sam 

  • W.R. Corporal
  • Group: Members
  • Posts: 117
  • Joined: 07-February 07
  • Gender:Male

Posted 24 February 2007 - 03:52 PM

How do you style the link to open a new window in Xhtml strict ? Apparently target=_blank is not valid anymore.
0

#2 User is offline   Catalyst 

  • Codesmith
  • Group: Administrators
  • Posts: 1,049
  • Joined: 04-April 06
  • Gender:Male
  • Location:San Diego

Posted 24 February 2007 - 04:35 PM

You have to use some hackish javascript, which then doesn't work if they have javascript disabled. Another option is to write your own DTD to validate against. Personally I just use target anyway and put up with the validation warning. Or of course you can use XHTML transitional.
0

#3 User is offline   sam 

  • W.R. Corporal
  • Group: Members
  • Posts: 117
  • Joined: 07-February 07
  • Gender:Male

Posted 24 February 2007 - 09:51 PM

Hmmm They just made life difficult by deprecating target. I am trying not to use javascript as much as possible and like to follow strict doc type. So I am going back to HTML 4.01.
0

#4 User is offline   marcamos 

  • W.R. General
  • Group: Administrators
  • Posts: 2,849
  • Joined: 04-April 06
  • Gender:Male
  • Location:Massachusetts - USA

Posted 24 February 2007 - 10:35 PM

Is there a valid reason why a new window is needed? Usually, there isn't; opening a new window on a visitor is poor user-experience design.

Most people, now-a-days, see it as a sleazy thing to do.
0

#5 User is offline   ultra99 

  • W.R. Corporal
  • Group: Members
  • Posts: 95
  • Joined: 02-February 07

Posted 25 February 2007 - 12:52 AM

But if that was an ad or an external link, ppl would want it in a new window.
0

#6 User is offline   Catalyst 

  • Codesmith
  • Group: Administrators
  • Posts: 1,049
  • Joined: 04-April 06
  • Gender:Male
  • Location:San Diego

Posted 25 February 2007 - 03:18 AM

Going all the way back to HTML 4 is a bit far. Just use XHTML transitional instead of strict.
0

#7 User is offline   Karl Buckland 

  • A.K.A. Sirkent
  • Group: Administrators
  • Posts: 2,145
  • Joined: 04-April 06
  • Gender:Male
  • Location:Kent, UK

Posted 25 February 2007 - 05:29 AM

I found myself annoyed when I realised that target was no longer useable, but then I realised - Why should it be?

The reason that target has been deprecated is because frames are a big 'no-no' now and, to be frank, whether a new window is needed or not is a decision that should be made by the visitor, not by you.

When it comes to ads, most ads are loaded via Javascript anyway nowadays, so that problem doesn't exist.

Why does the notion exist that, if it's an external page, then it should open in a new window? It's because you're trying to force the user to stay on your site. But if they want to stay on your site, they will - either by opening the link in a new window anyway, or by going back to your site after they're finished with the link. If they were finished with your site, then they'll simply close the new window, then close your window and that's that.
QUOTE(benbramz @ Aug 17 2007, 07:44 AM) Ive noticed that quite a few people are now adding quotes from the board into their signature. I think its started an new web-radiance craze.. :P
0

#8 User is offline   Catalyst 

  • Codesmith
  • Group: Administrators
  • Posts: 1,049
  • Joined: 04-April 06
  • Gender:Male
  • Location:San Diego

Posted 25 February 2007 - 02:31 PM

While I don't personally like things to pop up in new windows and I argue against it, my clients very often specifically tell me to make that happen. They don't like the idea of a user leaving their site to check out their resource links after paying all that money to get a nice site built and putting money into ads just to get them to the site.

There's all sorts of things that I think aren't good ideas that I have to ultimately do because it's their money. "Click here" links are another classic annoyance that I'm often forced into.
0

#9 User is offline   sam 

  • W.R. Corporal
  • Group: Members
  • Posts: 117
  • Joined: 07-February 07
  • Gender:Male

Posted 25 February 2007 - 03:23 PM

I personally like it when offsite links open in a new window because when I am done I can return to where I was by just closing the new window. It also cuts down on the time taken to reload the page when you press the back button. So I wanted to implement it on our site. But I am having second thoughts about it after reading the views of others here. I guess its a good idea to leave it to the user. But it sure does increase the chance of people leaving your site if they were casually browsing isn't it ?
0

#10 User is offline   Karl Buckland 

  • A.K.A. Sirkent
  • Group: Administrators
  • Posts: 2,145
  • Joined: 04-April 06
  • Gender:Male
  • Location:Kent, UK

Posted 25 February 2007 - 04:47 PM

Maybe it does, but ask yourself: Has it ever stopped you?

As for reloading the previous page with the back button - I use Opera so that doesn't happen - I hit back and it goes back instantaneously (Firefox does too as a rule). But either way, there's nothing stopping you from opening a new window if you want.
QUOTE(benbramz @ Aug 17 2007, 07:44 AM) Ive noticed that quite a few people are now adding quotes from the board into their signature. I think its started an new web-radiance craze.. :P
0

#11 User is offline   Catalyst 

  • Codesmith
  • Group: Administrators
  • Posts: 1,049
  • Joined: 04-April 06
  • Gender:Male
  • Location:San Diego

Posted 25 February 2007 - 06:55 PM

I think it's a double edged solution. My wife for example wouldn't have a clue how to open something in a new window. She also might not notice that a link opened a new window and know to close it to get back to what she was looking at, the back button wouldn't work of course.
0

#12 User is offline   sam 

  • W.R. Corporal
  • Group: Members
  • Posts: 117
  • Joined: 07-February 07
  • Gender:Male

Posted 25 February 2007 - 08:53 PM

For computer savvy people it doesn't really matter I guess. Never bothers me. But for others it depends on how familiar they are. I guess I will ask around to see what people feel about it and report back :)
0

#13 User is offline   TJSingleton 

  • Allegedly Legendary
  • Group: Members
  • Posts: 517
  • Joined: 31-July 06
  • Location:Winder, GA

Posted 25 February 2007 - 10:51 PM

View Postultra99, on Feb 25 2007, 12:52 AM, said:

But if that was an ad or an external link, ppl would want it in a new window.


Shouldn't people decide this for them self?
0

#14 User is offline   TJSingleton 

  • Allegedly Legendary
  • Group: Members
  • Posts: 517
  • Joined: 31-July 06
  • Location:Winder, GA

Posted 25 February 2007 - 10:53 PM

If you do open a link in a new window, i think it's good to inform the user. Like with the icon you see at wikipedia.

In my book, javascript is the best option.
0

#15 User is offline   Ryan Fait 

  • W.R. Sergeant
  • Group: Members
  • Posts: 204
  • Joined: 07-January 07
  • Location:Las Vegas

Posted 05 March 2007 - 02:43 AM

I don't like it when sites force my browser into a new window. I'll do it myself if I want that to happen. It also harms some functionality with tabbed browsers. If you absolutely need to use popups, this is the best solution I've come across.

http://adactio.com/atmedia2005/
The commercial front for my freelance web design company.
0

#16 User is offline   TJSingleton 

  • Allegedly Legendary
  • Group: Members
  • Posts: 517
  • Joined: 31-July 06
  • Location:Winder, GA

Posted 05 March 2007 - 07:19 AM

Jeremy Keith is awesome. Only thing I'd say about his presentation is not to use class="popup", but something more like class="external" or class="sidenote"

Popup describes it's presentation. The others describe what it is. It's a more semantic approach.
0

#17 User is offline   Ryan Fait 

  • W.R. Sergeant
  • Group: Members
  • Posts: 204
  • Joined: 07-January 07
  • Location:Las Vegas

Posted 05 March 2007 - 06:35 PM

I'm loose on that subject. I don't feel the need to make ambiguous class names, but that's another topic. What kills me most is seeing people use JavaScript to add target="_blank" to links so validators don't read them. I'm guilty of cloaking, though. I've done that with CSS opacity in the past :/
The commercial front for my freelance web design company.
0

#18 User is offline   sam 

  • W.R. Corporal
  • Group: Members
  • Posts: 117
  • Joined: 07-February 07
  • Gender:Male

Posted 05 March 2007 - 07:09 PM

Using Java script to open a new window is still the same as putting in a direct link to open in new window using XHTML transitional. Its just that the validator can not see it. As a curiousity driven exercise I did ask around about people's preference about this. Many people said they prefer offsite links to open in new window but with an indication by the side.
0

#19 User is offline   TJSingleton 

  • Allegedly Legendary
  • Group: Members
  • Posts: 517
  • Joined: 31-July 06
  • Location:Winder, GA

Posted 06 March 2007 - 08:22 AM

View PostCatalyst, on Feb 25 2007, 03:18 AM, said:

Going all the way back to HTML 4 is a bit far. Just use XHTML transitional instead of strict.

I'd rather use HTML 4.01 Strict than XHTML transitional
0

#20 User is offline   TJSingleton 

  • Allegedly Legendary
  • Group: Members
  • Posts: 517
  • Joined: 31-July 06
  • Location:Winder, GA

Posted 06 March 2007 - 08:28 AM

View Postsam, on Mar 5 2007, 07:09 PM, said:

Using Java script to open a new window is still the same as putting in a direct link to open in new window using XHTML transitional. Its just that the validator can not see it. As a curiousity driven exercise I did ask around about people's preference about this. Many people said they prefer offsite links to open in new window but with an indication by the side.


I'd challenge that statement. The whole point of taking it out of xHTML is to increase it's semantics. Remove the presentation and behavior from the markup. Opening a new window on click is a behavior what javascript is intended for. The validator doesn't mark it as wrong be cause of the action of opening a new window, but because the act of opening a new window does not belong in the markup.

Also, even if javascript is off, your site will still work. I don't see any reason not to "progressively enhance" your site, with specific links opening in external windows.
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users