Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JavaScript and XHTML

    We are all being pushed one way or another towards standardization.
    To this end I am attempting to make my documents XHTML compliant.

    I currently use, as part of my program, the language version of JavaScript.

    <code><script language="JavaScript1.5"></code>

    This however is not accepted within the XHTML standard.

    The standard is now:

    <code><script type="text/javascript"></code>

    Is there a way to return the version being used and still be XHTML compliant?

    I can still enter:

    <code><script language="JavaScript1.5" type="text/javascript"></code>

    However this no longer differentiates between the different versions as the type statement overrides the language statement.

    Any thoughts?

    Tom

  • #2
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    You could/should now be using object detection instead of js versioning.

    What do you intend each 'version' to do?

  • #3
    Regular Coder
    Join Date
    Mar 2004
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts
    JS 1.5 has stuff like try / catch. That's not possible to detect in earlier versions without an error.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    But why would you need to? What browser worth considering uses an older version than 1.5?
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark


  •  

    Posting Permissions

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