www.webdeveloper.com
Results 1 to 14 of 14

Thread: validation problem

  1. #1
    Join Date
    Nov 2002
    Posts
    6

    validation problem

    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

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    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.

  3. #3
    Join Date
    Nov 2002
    Posts
    6
    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

  4. #4
    Join Date
    Nov 2002
    Posts
    984

    Re: validation problem

    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.
    // Stefan Huszics

  5. #5
    Join Date
    Nov 2002
    Posts
    6
    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

  6. #6
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    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.

  7. #7
    Join Date
    Nov 2002
    Posts
    6
    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.

  8. #8
    Join Date
    Nov 2002
    Posts
    984
    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.
    Last edited by Stefan; 11-21-2002 at 09:51 AM.
    // Stefan Huszics

  9. #9
    Join Date
    Nov 2002
    Posts
    6
    Yes, I know about the other errors, thanks!

    Deb

  10. #10
    Join Date
    Nov 2002
    Location
    England
    Posts
    275
    If you do decide to take Stefan's advice and use a text HTML Editor, I'd recommend 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).

  11. #11
    Join Date
    Nov 2002
    Posts
    6
    Thanks for the recommendation!

    Deb

  12. #12
    Join Date
    Nov 2002
    Posts
    631

    Thumbs up Re: Re: validation problem

    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!

  13. #13
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    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 )

  14. #14
    Join Date
    Nov 2002
    Location
    England
    Posts
    275
    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)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles