Results 1 to 3 of 3

Thread: Load External JavaScript

  1. #1
    Join Date
    Apr 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Load External JavaScript

    If I am making a site using various scripts etc.

    (such as many that you find on dynamic drive) that ALL requires various javascript in the header section and all work fine in conjunction with each other.

    Would it work jsut as well to bung all the codes into a file like "filename.js"

    Then just stick:
    Code:
    <script type="text/javascript" src="filename.js">
    
    </script>
    into the page headers.

    Would the scripts still run this way?
    Last edited by Snookerman; 05-12-2009 at 04:21 PM. Reason: added “Resolved” prefix

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Not only should they run, it's also recommended to combine all external JavaScript files into one, in order to reduce the number of http requests. Just remember that you must follow the DD usage terms which among others say that the credit notice must still be retained within the <script> tags, in the page's visible source.

    Happy coding!
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  3. #3
    Join Date
    Apr 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks =] I am a total java dunce and I had already considered that as I gotta loop my own "credit" in anyway so the work can be traced bk to me if I move on

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
  •