validation problem

liunx

Guest
Hi,<br />
<br />
I am having validation problems.<br />
<br />
Here is the validation error:<br />
<br />
"Error: end tag for element "A" which is not open; try removing the end tag or check for improper nesting of elements"<br />
<br />
here is the offending code:<br />
<br />
<td bgcolor="#86A3C3" onMouseOver="pviiW3Cbg(this, '#FFFFFF')" onMouseOut="pviiW3Cbg(this, '#86A3C3')"><br />
<a href=http://www.mozilla.org/ target="_blank" class="side" onFocus="if(this.blur)this.blur()">Mozilla</a> <br />
<br />
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:<br />
<br />
<td bgcolor="#86A3C3" onMouseOver="pviiW3Cbg(this, '#FFFFFF')" onMouseOut="pviiW3Cbg(this, '#86A3C3')"><a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.opera.com/Download <!--more-->/" target="_blank" class="side" onFocus="if(this.blur)this.blur()">Opera</a> <br />
<br />
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.<br />
<br />
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.<br />
<br />
Any ideas?<br />
<br />
Thanks!<br />
Deb<!--content-->We'll ned a URL if we're going to find it. <br />
<br />
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.<!--content-->Hi Charles,<br />
<br />
Here's the url:<br />
<br />
<!-- w --><a class="postlink" href="http://www.watertownweb.net">www.watertownweb.net</a><!-- w --><br />
<br />
It's in the left sideboard under BROWSER UPDATES.<br />
<br />
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.<br />
<br />
I will remove the script you mention, I didn't know it cause problems, thank you for telling me.<br />
<br />
Deb<!--content-->Originally posted by puterbug <br />
<a href=http://www.mozilla.org/ target="_blank" class="side" onFocus="if(this.blur)this.blur()">Mozilla</a> <br />
<br />
<br />
You are missing the "" for the href=http://www.webdeveloper.com/forum/archive/index.php/"" . They are only optional for a very limited ammount of signs, so to avoid yourself the headace ALWAYS use quotes for ALL values.<!--content-->Hello Stefan,<br />
<br />
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. :( <br />
<br />
Deb<!--content-->If you've uploaded the correction then something's gone wrong, that error that Stefan mentioned is still there. <br />
<br />
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. <br />
<br />
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.<!--content-->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.<br />
<br />
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!<br />
<br />
I've now closed Dreamweaver and reopened it after saving the file *again* and the blasted quotes are *not* there!<br />
<br />
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.<br />
<br />
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.<br />
<br />
I've reuploaded what *should* be the corrected version.<!--content-->My advice, drop the WYSI(not)WYG editors and handcode your pages instead.<br />
<br />
BTW, you got a bunch of errors on that page of yours according to <!-- m --><a class="postlink" href="http://validator.w3.org">http://validator.w3.org</a><!-- m --><br />
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.<!--content-->Yes, I know about the other errors, thanks!<br />
<br />
Deb<!--content-->If you do decide to take Stefan's advice and use a text HTML Editor, I'd recommend HTML-Kit (<!-- m --><a class="postlink" href="http://www.chami.com/html-kit/">http://www.chami.com/html-kit/</a><!-- m -->) (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).<!--content-->Thanks for the recommendation!<br />
<br />
Deb<!--content-->Originally posted by Stefan <br />
You are missing the "" for the href=http://www.webdeveloper.com/forum/archive/index.php/"" . They are only optional for a very limited ammount of signs, so to avoid yourself the headace ALWAYS use quotes for ALL values. <br />
<br />
I have always used quotes just for style, but I never realized that made the links more compatible. Thanx!:)<!--content-->1: HTML Kit is great and the new build (292) has a lot of nice little XML / XHTML features. ( <!-- m --><a class="postlink" href="http://www.chami.com/html-kit/start/">http://www.chami.com/html-kit/start/</a><!-- m --> )<br />
<br />
2: From the HTML 4.01 Specification:<br />
<br />
"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." ( <!-- m --><a class="postlink" href="http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.2">http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.2</a><!-- m --> )<!--content-->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)<!--content-->
 
Back
Top