iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-12-2004, 09:06 PM
WebProWorld Pro
 
Join Date: Jul 2003
Location: NSW Australia
Posts: 170
freddieb RepRank 0
Default HTML 4.01 Strict

I'm trying to validate a page and have got it down to one item that W3C tells me is incorrect,even though they have a tutorial that tells you how to open another browser window using it!:

target="_blank">

Is there a workaround to make this compliant other than by using the JavaScript openwindow script?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 02-12-2004, 09:19 PM
WebProWorld 1,000+ Club
 
Join Date: Jul 2003
Location: Western Australia
Posts: 1,336
matauri RepRank 0
Default

If your trying for Strict....then no it prob wont validate, because its a depreciated tag. Probably will with Transitional though.


Cindy
__________________
Web Development Community ::: Forum ::: Library

It' time for Progressive Web & IT Development!
Reply With Quote
  #3 (permalink)  
Old 02-12-2004, 09:42 PM
WebProWorld Pro
 
Join Date: Jul 2003
Location: NSW Australia
Posts: 170
freddieb RepRank 0
Default Validation

Thanks, Mat. So do you suggest using the JavaScript if I want to validate strict?
Reply With Quote
  #4 (permalink)  
Old 02-12-2004, 09:49 PM
WebProWorld Member
 
Join Date: Jan 2004
Location: Hollywood, CA
Posts: 88
spice RepRank 0
Default

I suggest you ignore the fact that it doesn't validate, actually.
__________________
I do stuff.
Reply With Quote
  #5 (permalink)  
Old 02-12-2004, 09:58 PM
WebProWorld Pro
 
Join Date: Jul 2003
Location: NSW Australia
Posts: 170
freddieb RepRank 0
Default Validation

!!!!

What are your reasons? I'd like to know, 'cos if it doesn't validate I can't put the little W3C logo on my site!

Really, I'd like it to validate 'cos I've put a lot of work into getting it this far and I'm someone who doesn't like to give up. But I think I probably know what you're going to say!
Reply With Quote
  #6 (permalink)  
Old 02-13-2004, 01:31 AM
WebProWorld 1,000+ Club
 
Join Date: Aug 2003
Location: Edmonton, AB, Canada
Posts: 1,527
mikmik RepRank 2mikmik RepRank 2
Default

First, put this code in an external .js text file.
I named mine "openlinkNew.js"

function externalLinks() {
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
var anchor = anchors[i];
if (anchor.getAttribute("href") &&
anchor.getAttribute("rel") == "external")
anchor.target = "_blank";
}
}
window.onload = externalLinks;


I put this in the 'head':
<script src="/assets/skripts/openlinkNew.js" type="text/javascript"></script>

And I call the javascript by adding - rel="external" - to the links that I want to open in a new window like this:
<a href="http://attitude-emedia.com/index.html" rel="external" title="Graphic and Web design">

I got all this from an article on sitepoint.com, but I can't locate it.

My site validates, you can go to it and click the W3C buttons to double check.

I am checking out some code to put around the javascript tags that will allow XML validation, and maybe xhtml 2.0?
It is good for 1.0 strict, though.
Reply With Quote
  #7 (permalink)  
Old 02-13-2004, 02:05 AM
WebProWorld 1,000+ Club
 
Join Date: Jul 2003
Location: Western Australia
Posts: 1,336
matauri RepRank 0
Default

Below is the code I use & I validate in XHTML. You can either chose to set the parameters as I have of the opening window, or not, its up to you. Though, I do suggest, that you only use parameters such as I have below for if your displaying something small. Otherwise have it open in a normal size window.

LINK



Cindy
__________________
Web Development Community ::: Forum ::: Library

It' time for Progressive Web & IT Development!
Reply With Quote
  #8 (permalink)  
Old 02-13-2004, 02:30 PM
WebProWorld Pro
 
Join Date: Jul 2003
Location: NSW Australia
Posts: 170
freddieb RepRank 0
Default Open window

Thanks Mik & Mat

I am aiming for XHTML validation (after I get the Strict HTML 4.01 so this is really handy stuff.
Reply With Quote
  #9 (permalink)  
Old 02-13-2004, 03:45 PM
WebProWorld Member
 
Join Date: Jan 2004
Location: Hollywood, CA
Posts: 88
spice RepRank 0
Default

My point was that the only reason you're trying to get it to validate is so you can have the little icon on your site. That's all well and good, but you're hurting site functionality to make that happen. The W3C isn't always right. The target attribute has been deprecated in XHTML 1.0 but apparently will be restored in XHTML 2.0, because it does indeed serve a useful function.

Matauri/Mik's code solve the problem... unless the user doesn't have javascript, in which case your site breaks. The whole point of XHTML compliance is to increase accessibility, so it doesn't make any sense to purposely do actions that DECREASE accessibility in order to be compliant.

At the very least, change Matauri's code to this:

Code:
LINK
Now the URL is in the href so it's still navigable if JS is disabled. The "return false" in the script ensures that the href navigation will NOT occur if javascript IS enabled. It's a fully redundant solution.
__________________
I do stuff.
Reply With Quote
  #10 (permalink)  
Old 02-13-2004, 04:21 PM
WebProWorld 1,000+ Club
 
Join Date: Jul 2003
Location: Western Australia
Posts: 1,336
matauri RepRank 0
Default

Must try that Spice, I was going to test one of my new sites soon with my code on it, will try it with your variation.



Cindy
__________________
Web Development Community ::: Forum ::: Library

It' time for Progressive Web & IT Development!
Reply With Quote
  #11 (permalink)  
Old 02-13-2004, 04:31 PM
WebProWorld 1,000+ Club
 
Join Date: Aug 2003
Location: Edmonton, AB, Canada
Posts: 1,527
mikmik RepRank 2mikmik RepRank 2
Default

spice wrote
Quote:
Matauri/Mik's code solve the problem... unless the user doesn't have javascript, in which case your site breaks. The whole point of XHTML compliance is to increase accessibility, so it doesn't make any sense to purposely do actions that DECREASE accessibility in order to be compliant
The whole point of my code is to have as little impact on the pages as possible, so that it will still appear almost exactly the same if javascript IS disabled, which as I understand it is only 3% of users.

How can adding * rel="external" * possibly cause a page to break?
I am very curious about this, spice.
Is there something I should know about?

Compare: rel="external"

to:
onclick="window.open('blah.html','','toolbar=no,lo cation=no,scrolling=yes,directories=no,
status=no,menubar=no,scrollbars=no,resizable=yes,
width=600,height=640');return false"

What affects the code more? Not to mention exactly reproducing the effect of "target="_blank""?
Reply With Quote
  #12 (permalink)  
Old 02-13-2004, 04:49 PM
WebProWorld 1,000+ Club
 
Join Date: Aug 2003
Location: Edmonton, AB, Canada
Posts: 1,527
mikmik RepRank 2mikmik RepRank 2
Default

Quote:
XHTML 2.0 is a markup language intended for rich, portable web-based applications. While the ancestry of XHTML 2.0 comes from HTML 4, XHTML 1.0, and XHTML 1.1, it is not intended to be backward compatible with its earlier versions. Application developers familiar with its earlier ancestors will be comfortable working with XHTML 2.0.

XHTML 2 is a member of the XHTML Family of markup languages. It is an XHTML Host Language as defined in Modularization of XHTML. As such, it is made up of a set of XHTML Modules that together describe the elements and attributes of the language, and their content model. XHTML 2.0 updates many of the modules defined in Modularization of XHTML, and includes the updated versions of all those modules and their semantics. XHTML 2.0 also uses modules from Ruby, XML Events, and XForms.
In fact, both the target AND the rel attributes are included: http://www.w3.org/TR/xhtml2/mod-attr...#col_Hypertext
In any event, what is the point if you are not even worried about 1.0, in being forward compatible to 2.0?
Reply With Quote
  #13 (permalink)  
Old 02-14-2004, 12:10 AM
Moderator
WebProWorld Moderator
 
Join Date: Oct 2003
Location: Alberta, Canada
Posts: 879
weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6
Default <pre>target="_blank"</pre>

It was a toss up, but in the end, Strict won out, and I decided that accessibility was more important to me than having more windows popping open for my "challenged" users.

Admittedly, it was a drag to give up multiple windows, though not that great a sacrifice.

I'm trying to learn how to develop accessible websites, without a lot of eye candy and fancy javascript. Kind of like starting at the basement and working my way up, so to speak. Not being a professional, I felt it was the best place to start now that I have my feet wet with free-flowing divisions and no tables in HTML 4.01/XHTML1.0.

Of course, I already know that nobody here is interested in what I'm doing as an amateur, since it is so far removed from the type of websites I keep seeing in the 'Review My Website' forum, and our logs show that no one checks them out when I do post the urls, so I won't waste anyone's time by posting anything here, now.

To my mind, the majority of those sites suck the big one, big time--all loaded down with borrowed scripts, cookies up the whazzoo, tonnes of third party advertising, keyword lists that are 500 bytes long, irrelevant content, rollover menus that suck up bandwidth and add nothing to the value of the site,... need I continue? Hardly.

What surprises me most is that Webnaut is not speaking up about some of these sites. Jacob Nielsen would have a bird if he looked at half of them.

If search engines rated sites on effeciency, usability and accessibility, most of these sites would be down at the bottom of the search results where they belong.

So in my opinion, Fred, go with the Strict and don't have extra windows opening. Visitors can still use the back button or the backspace key to find your site again, or look in their history if it really is a site they want to return to.

The web is cluttered up enough, as it is. IMHO, we need more developers publishing straight forward, simple, efficient websites that are accessible and easy for users, and not full of surprises, either in myriad windows or a burgeoning cookie tray.
Reply With Quote
  #14 (permalink)  
Old 02-14-2004, 12:50 AM
ranjan's Avatar
WebProWorld Pro
 
Join Date: Sep 2003
Location: CA
Posts: 153
ranjan RepRank 0
Default

Quote:
Matauri/Mik's code solve the problem... unless the user doesn't have javascript, in which case your site breaks.
A javascript disabled browser will still open the links (altough in the same window). The site doesnot break!

I thought Spice would know that since he is such an expert at reading javascripts
__________________
ranjan | Macromedia Certified Dreamweaver MX Developer
http://www.dreamlettes.net - a dreamweaver resource
http://www.ranjan.ws - got blog?
http://www.total-impact.com - a web design community
Reply With Quote
  #15 (permalink)  
Old 02-14-2004, 03:10 AM
WebProWorld 1,000+ Club
 
Join Date: Jul 2003
Location: Western Australia
Posts: 1,336
matauri RepRank 0
Default

Well guys, I tried my original code in Opera (as I have javascript disabled in that one for testing), and my original code didnt give me the new window. I replaced the # with the url, and it opened in same window, with it still working ok in a javascript enabled browser.

In regards to accessibility issues with new windows, I have yet to find a problem here. If your <title> tag says that you are opening a new window, there is no confusion. Once the window is open, there is no difference to any window being open. It doesnt clutter the web, and makes no difference so far in validation. If anyone can find otherwise, I would be interested in reading about it.


Cindy
__________________
Web Development Community ::: Forum ::: Library

It' time for Progressive Web & IT Development!
Reply With Quote
  #16 (permalink)  
Old 02-14-2004, 03:33 AM
WebProWorld 1,000+ Club
 
Join Date: Aug 2003
Location: Edmonton, AB, Canada
Posts: 1,527
mikmik RepRank 2mikmik RepRank 2
Default

ranjan wrote(like I did also)
Quote:
A javascript disabled browser will still open the links (altough in the same window). The site doesnot break!
Thanks, ranjan. I was doubting myself for a second cause I thought the same for spice, and I was also concerned about my credibility.

I tested mine in javascript disabled, and it performed as you said, as it was planned to do.
The link I have it enabled on is the 'attitude' gif, centered(except ie5x!)just above the footer - if folks want to check it out.

I am using my site mostly just for learning and demonstrations so I try all sorts of stuff, espescially for testing for others.

As far as the accessability of new windows, I have read about it being both confusing and difficult for some people,
Confusing because many people rely on their back button to navigate, and often don't realize that a new window has openned, so they get stuck trying to retreat to the original page and also can get confused. It took me a while to understand in the very beginning.

I also have read about it being just plain difficult for certain types of keyboard navigation with new windows being difficult to handle, as well as breaking the flow as far as history utilization is concerned.

I am very much now of the mindset to not even bother anymore with opening pages in new windows. If my site is friendly, and useful, people will remember that and return - sometime anyways.
They can always right click a link to open in new windows, and some people actually resent the new window thing being forced upon them.

I want to have people feel as comfortable and taken care of as possible in order to attract them, not try 'tricks' to make them have to return to my site, or to trap them. That will only serve to anger them.

Quote:
Don't Open New Windows (target="_blank")
Actually you should not force links to open in a new window or popups (such as with the "target" attribute or with JavaScript).

Changing the current window or popping up new windows can be very disorienting to users who cannot see that this has happened.
From http://forums.htmlcenter.com/archive...3B%29/613.html
webnauts!

Still more:
Quote:
W3C Validator mailing list: Re: opening a link in a new window. For those who care about this sort of thing, you should know that the target attribute of the <a> tag is deprecated, and will prevent your pages from validating in HTML 4.01 Strict, XHTML 1.0 Strict, or any future version.
From this GREAT site: http://diveintoaccessibility.org/day...w_windows.html
Okay, bedtime!
(Hey, half the stuff in this post is news to me - we all learn :o)
Reply With Quote
  #17 (permalink)  
Old 02-14-2004, 04:33 AM
WebProWorld 1,000+ Club
 
Join Date: Jul 2003
Location: Western Australia
Posts: 1,336
matauri RepRank 0
Default

ahhh Mik! I tend to disagree, at least in some instances. If a new page is only telling me a snippet of information,a FAQ or is a photo,etc.... I dont like that I have have lost my previous window just to view it.

You know me, I am a freak multi-tasker, waiting on windows to load each time is a pain in the butt for little bits of info. Yes I want to read 'that'...but I want to keep reading 'this' while it loads. I know you can do it right clicking to open a new window, but really...isnt it easier to just click, click, click & open as many FAQ answers as you like without going to the drama of right clicking & opening a whole new window?

I believe everything has its place. It just has to be used for the right purpose.

As for accessibility...as I said ;-)
Quote:
If your <title> tag says that you are opening a new window, there is no confusion.
or <alt> tag if its an image.
A reader should pick up this description as it would with the rest of the info in that tag. So the reader would be telling the user a new window is opening. But, (and correct me if I am wrong), a reader would have no javascript enabled?, so if it operates without javascript being enabled, there shouldnt be a problem.

I think the population of people that opening a new window this way would affect, would be so minor, it would be another case of 'some' people not being able to get 100% functionablity of the net. And to be honest, I know no one who has 100% functionability of the net.

I find that with most things in this calibre, you have to weight up the 'fors' and 'against' to the benefits of having it.

But to just open up a new window with a page because you feel like it....then NOOOO... no real purpose to it.


Cindy
__________________
Web Development Community ::: Forum ::: Library

It' time for Progressive Web & IT Development!
Reply With Quote
  #18 (permalink)  
Old 02-14-2004, 05:05 AM
WebProWorld 1,000+ Club
 
Join Date: Aug 2003
Location: Edmonton, AB, Canada
Posts: 1,527
mikmik RepRank 2mikmik RepRank 2
Default

Matauri says
Quote:
ahhh Mik! I tend to disagree, at least in some instances. If a new page is only telling me a snippet of information,a FAQ or is a photo,etc.... I dont like that I have have lost my previous window just to view it.
Oh, I see, you're going to bring that into it, hey (snicker snicker )

Well, then. We are talking about different scenarios?
I am only thinking of opening normal pages, not considering the 'snippets' and pictures angle, you see.

So, I disagree that you disagree, because we both agree, agreed?

I actually do with 'tips' what you have done with your FAQ's, not to mention the pictures of Red Canyon.
I am beautiful when I'm angry LOL ;o*

:O)
Reply With Quote
  #19 (permalink)  
Old 02-14-2004, 03:31 PM
Moderator
WebProWorld Moderator
 
Join Date: Oct 2003
Location: Alberta, Canada
Posts: 879
weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6
Default

Quote:
Originally Posted by mikmik
I am very much now of the mindset to not even bother anymore with opening pages in new windows. If my site is friendly, and useful, people will remember that and return - sometime anyways.
They can always right click a link to open in new windows, and some people actually resent the new window thing being forced upon them.

I want to have people feel as comfortable and taken care of as possible in order to attract them, not try 'tricks' to make them have to return to my site, or to trap them. That will only serve to anger them.
Well put. Those are some great links, MikMik. Like always, we can see that you're doing your homework.

Quote:
Originally Posted by Matauri
I think the population of people that opening a new window this way would affect, would be so minor, it would be another case of 'some' people not being able to get 100% functionablity of the net. And to be honest, I know no one who has 100% functionability of the net.
This is another matter.

If your message is important, and relevant, you can always find ways to deliver it using a method that doesn't marginalize your visitors.

And just what is so hard about right-clicking, anyway? It has a two-fold benefit:

1) The user 'knows' they have another window opened, and will be prepared to close it, or [Alt]-[Tab] between it and the other(s); and,
2) It reduces the likelihood of cross-browser scripting, by treating the new windows as separate, independent browser events in the cache (if I am correct in judging this to be the case; I could be dead wrong).

Of course, some sites don't want you to do this because it breaks 'their' flow, and interrupts their logging of referring sites as well as tracking of click-through's. Bully for them. If they cannot make it on the merit of their own product(s) and must depend solely on click-through traffic for their revenue, they shouldn't be on the web, anyway. (More IMHO)
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:16 AM.



Search Engine Optimization by vBSEO 3.3.0