SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Addict dotancohen's Avatar
    Join Date
    Aug 2005
    Location
    Haifa
    Posts
    314
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Validating my XHTML

    the pages at http://what-is-what.com _almost_ validate. I get only this error, because of JavaScript on the page:
    Code:
    Error  Line 76 column 158: there is no attribute "onFocus".
    ...er your email address here." onFocus="clear_email()" /></td>
    How can I get the page to validate, and yet use the Javascript. Is Javascript illegal in XHTML?

    Thanks.
    . Have a question?
    . . What Is Firefox?
    . . . . What Is Open Office?
    . . . . . . What Is What?

  2. #2
    SitePoint Guru Rob_D's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which page didn't validate?

  3. #3
    SitePoint Addict dotancohen's Avatar
    Join Date
    Aug 2005
    Location
    Haifa
    Posts
    314
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The home page, for one.
    . Have a question?
    . . What Is Firefox?
    . . . . What Is Open Office?
    . . . . . . What Is What?

  4. #4
    SitePoint Guru Rob_D's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Still can't find the code...

  5. #5
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Javscript is legal, of course. The only error I see is on the homepage because you try to use the width attribute which is deprecated in xhtml.

  6. #6
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The validation error shown is:

    Error Line 52 column 64: there is no attribute "width".
    ... <input type="text" name="form" maxlength="64" width="20" />?

    Try replacing width="20" with style="width:20px;" and I think that should sort it out
    procureNET.biz
    Global B2B Trade & eProcurement

  7. #7
    Non-Member deathshadow's Avatar
    Join Date
    Jul 2006
    Location
    Dublin, NH
    Posts
    901
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The onFocus error (on whatever page has it) is from the upper case letter - all codes must be in lower case for XHTML Strict... so that's onfocus, not onFocus

  8. #8
    SitePoint Addict dotancohen's Avatar
    Join Date
    Aug 2005
    Location
    Haifa
    Posts
    314
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, all. I fixed the "width" problem (that I was unaware of) and the JavaScript problem. Could someone please confirm that the JavaScript still works in IE, as I don't have Internet Explorer installed to check? I did check in Firefox and in Opera.

    You can find the JavaScript on the bottom of these pages:
    http://what-is-what.com/what_is/bluetooth.html
    http://what-is-what.com/what_is/javascript.html
    http://what-is-what.com/what_is/open_source.html

    or basically any page in the /what_is/ directory. Thanks.
    . Have a question?
    . . What Is Firefox?
    . . . . What Is Open Office?
    . . . . . . What Is What?

  9. #9
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Works for me in ie 6
    procureNET.biz
    Global B2B Trade & eProcurement

  10. #10
    SitePoint Zealot
    Join Date
    Jul 2006
    Location
    Melbourne
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Works in IE 7

  11. #11
    SitePoint Addict dotancohen's Avatar
    Join Date
    Aug 2005
    Location
    Haifa
    Posts
    314
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for checking.
    . Have a question?
    . . What Is Firefox?
    . . . . What Is Open Office?
    . . . . . . What Is What?


Bookmarks

Posting Permissions

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