Results 1 to 3 of 3

Thread: Ultimate Slide Show -Link To .js?

  1. #1
    Join Date
    Feb 2006
    Location
    Arizona
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ultimate Slide Show -Link To .js?

    Great script that works "like a charm"...

    I'm wondering if there is any way to seperate the javascript from the html <head> section so I can just link to the .js file?

    This would reduce the amount of "clutter" I have in the .html page...

    I just like to keep everything clean and seperate...sorry maybe a bit "A" type as in "anal"?

    You know:
    images in the /images folder
    styles in the /styles folder
    scripts in the /scripts folder

    TIA,
    -K

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I just like to keep everything clean and seperate...
    Good
    Yes, you certainly can. Take everything out of the <script> tags in the head section (except HTML comment delimiters, if they're in there, and the Dynamic Drive license [and its decorations, which contain necessary Javascript comment delimiters]) and store it in a seperate .js file. This file must not have any HTML in it. Then, add a src attribute to the <script> tag to point to the script, just like you would for an image.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Feb 2006
    Location
    Arizona
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Twey,

    Thanks I think the problem was I had left all the other "stuff" in there...now it's working just fine...

    Thanks again,
    -K

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
  •