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 3 of 3
  1. #1
    New Coder
    Join Date
    May 2003
    Location
    Japan
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Internal/external JS's

    Is there a problem with windows OS's finding external JS's?
    I have turned all my JS's into external JS's on a Mac and the pages were fine. But now I go and check the page on a windows platform and the JS'S don't load.
    I am coding it as such:
    <script language ="text/javascript" src="?????.js"></script>

    When checking the page I reurned a few of the scripts back to internal JS's and they worked. Is it a common problem?
    And how do I fix it.
    Everybody tells me to make them external JS's as it makes the coding clearer and page lighter, especially if they are big JS'S.

    Any help appreciated.

    Rafton
    Forever Trying!!
    Always Learning!!

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    I am affraid that is a syntax error on your refrence.

    As far as I know, language must be "JavaScript". Type must be "text/javascript".

    That means language="text/javascript" seems not the correct syntax to me. Maybe a moderator will tell us more about those...

    So use or
    language="JavaScript"
    or
    type="text/javascript"
    or both
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    Most browsers only recognise "ecmascript", "javascript" and "livescript" in the language attribute. Some recognise "jscript" (no, not only ie). A few recognise additional values.

    As for type attribute, however, browsers that doesn't recognise it as a registred content type, and that can't parse that content type, SHOULD ignore it. Most do. Content types that are generally accepted are "text/javascript", "application/x-javascript", "text/ecmascript", "text/plain" & "text/html" (both treated as "text/javascript"). Some also accept "text/unknown".

    If you don't need to use a JS1.2 specific feature I suggest you go with type="text/javascript".
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards


  •  

    Posting Permissions

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