Click to See Complete Forum and Search --> : validation problem
puterbug
11-21-2002, 03:38 AM
Hi,
I am having validation problems.
Here is the validation error:
"Error: end tag for element "A" which is not open; try removing the end tag or check for improper nesting of elements"
here is the offending code:
<td bgcolor="#86A3C3" onMouseOver="pviiW3Cbg(this, '#FFFFFF')" onMouseOut="pviiW3Cbg(this, '#86A3C3')">
<a href=http://www.mozilla.org/ target="_blank" class="side" onFocus="if(this.blur)this.blur()">Mozilla</a>
I have other lines of code in the same include, that matches this one exactly, except for they're links to other browsers than Mozilla. Here is that code:
<td bgcolor="#86A3C3" onMouseOver="pviiW3Cbg(this, '#FFFFFF')" onMouseOut="pviiW3Cbg(this, '#86A3C3')"><a href="http://www.opera.com/download/" target="_blank" class="side" onFocus="if(this.blur)this.blur()">Opera</a>
I do *not* get a validation error on the other code (total of 5 links on the page, all coded the same, but the only one throwing the error is the one to Mozilla.
I do *not* see an extra ending </a> tag anywhere, but I'm an admitted javascript idiot, so I'm guessing it might be somewhere in the nesting, however it all looks like it matches in both codes to me. I even did a search for all </a> tags on the page and there are only 5, all belonging to a true link.
Any ideas?
Thanks!
Deb
Charles
11-21-2002, 05:31 AM
We'll ned a URL if we're going to find it.
By the way, your onfocus handler ( onfocus="if (this.blur)this.blur" ) will make your page un-usable for persons who are not using a mouse but who are using JavaScript. And there are plenty of people who are not using a mouse, either because of choice or necessity.
puterbug
11-21-2002, 05:54 AM
Hi Charles,
Here's the url:
www.watertownweb.net
It's in the left sideboard under BROWSER UPDATES.
I can understand about the folks who *can't* use a mouse due to a disability or some such thing. But what do you mean about those who choose not to using Javascript. I got lost there.
I will remove the script you mention, I didn't know it cause problems, thank you for telling me.
Deb
Stefan
11-21-2002, 06:15 AM
Originally posted by puterbug
<a href=http://www.mozilla.org/ target="_blank" class="side" onFocus="if(this.blur)this.blur()">Mozilla</a>
You are missing the "" for the href="" . They are only optional for a very limited ammount of signs, so to avoid yourself the headace ALWAYS use quotes for ALL values.
puterbug
11-21-2002, 06:29 AM
Hello Stefan,
Thank you for finding that, I did indeed miss it. However, after uploading and attempting to validate the new version, the same error msg remains. So, although that was a good thing to fix, it didn't cure the problem. :(
Deb
Charles
11-21-2002, 07:07 AM
If you've uploaded the correction then something's gone wrong, that error that Stefan mentioned is still there.
Quite simply, not everybody has the use of their hands and some use head wands to 'tab' through the links on a page. Some just prefer the use of the keyboard to the use of the mouse.
Not all users are using JavaScript. I keep it disabled to defend myself from pop-ups, mouse trails, resized windows and such but there are people who, because of their disabilities, cannot use a browser with JavaScript. They may be using a Braille browser or other assistive technology that doesn't work with JavaScript.
puterbug
11-21-2002, 07:20 AM
I'll say something is wrong. I went back and looked at the file, the quotes are *not* there and I know I put them in there, saved and uploaded.
I just tried again 4x, I put the quotes in, save and then each test I closed the file and reopened it ... quotes were gone!
I've now closed Dreamweaver and reopened it after saving the file *again* and the blasted quotes are *not* there!
No wonder you still saw them. I have no clue how to fix that. I tried taking the file to notepad to fix it there ... to much gibberish shows up to wade through it.
So, now I've grabbed a view source, fixed it in there and saved it as my file, and now when I open it in DW the quotes are there. That's the 2nd time tonight I've had to do that.
I've reuploaded what *should* be the corrected version.
Stefan
11-21-2002, 10:48 AM
My advice, drop the WYSI(not)WYG editors and handcode your pages instead.
BTW, you got a bunch of errors on that page of yours according to http://validator.w3.org
It's entirely possible that a previous error causes havoc later on in the page, so you should probably start at the very top and fix the errors one by one.
puterbug
11-21-2002, 10:58 AM
Yes, I know about the other errors, thanks!
Deb
Rick Bull
11-21-2002, 12:38 PM
If you do decide to take Stefan's advice and use a text HTML Editor, I'd recommend HTML-Kit (http://www.chami.com/html-kit/) (if you're using Windows that is). It's a really great editor. I love being able to press F1 over a tag or function in various languages, and the help for it comes up (if you have the manuals installed).
puterbug
11-21-2002, 12:44 PM
Thanks for the recommendation!
Deb
Zach Elfers
11-21-2002, 01:19 PM
Originally posted by Stefan
You are missing the "" for the href="" . They are only optional for a very limited ammount of signs, so to avoid yourself the headace ALWAYS use quotes for ALL values.
I have always used quotes just for style, but I never realized that made the links more compatible. Thanx!:)
Charles
11-21-2002, 02:47 PM
1: HTML Kit is great and the new build (292) has a lot of nice little XML / XHTML features. ( http://www.chami.com/html-kit/start/ )
2: From the HTML 4.01 Specification:
"In certain cases, authors may specify the value of an attribute without any quotation marks. The attribute value may only contain letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons (ASCII decimal 58). We recommend using quotation marks even when it is possible to eliminate them." ( http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.2 )
Rick Bull
11-21-2002, 05:46 PM
Personally I think it's good to use quotes all the time because it will make the transition to XHTML (if you choose to transit ;)) a lot easier (as they are mandatory)