Results 1 to 3 of 3

Thread: Image Thumbnail Viewer II question

  1. #1
    Join Date
    Oct 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Image Thumbnail Viewer II question

    Script: Image Thumbnail Viewer II
    http://www.dynamicdrive.com/dynamici...thumbnail2.htm

    Is it possible to put the array (or most of the <head> script) in a seperate html or something similar as a .JS file

    //Specify image paths and optional link (set link to "" for no link):
    var dynimages=new Array()
    dynimages[0]=["photo1.jpg", "http://www.cnn.com"]
    dynimages[1]=["photo2.jpg", "http://www.yahoo.com"]
    dynimages[2]=["photo3.jpg", "http://www.google.com"]


    regards
    -craban

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Certainly. The entire code of Step 1 can be inserted in an external .js file. Then you'd reference it on your page as such:

    Code:
    <script src="thumbnail.js" type="text/javascript">
    
    /***********************************************
    * Image Thumbnail Viewer II script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
    * This notice must stay intact for legal use
    ***********************************************/
    
    </script>
    Attached is how "thumbnail.js" would look like.

  3. #3
    Join Date
    Oct 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Thanks DDAdmin

    craban

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
  •