Web Analytics Made Easy -
StatCounter Image Thumbnail Viewer question - erros because of 2 scripts? - CodingForum

Announcement

Collapse
No announcement yet.

Image Thumbnail Viewer question - erros because of 2 scripts?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Image Thumbnail Viewer question - erros because of 2 scripts?

    I must be completely blind because I cannot seem to find the errors in my script. I do have two scripts working - one is an external one a menu bar. That one works just fine. It's the Thumbnail Viewer II that I can't seem to get to work. It worked just peachy by itself when I tested it out on a blank page.

    I had it in a table, does that matter? I did remove the tables and hoped that it would work, but alas, no. Also I have 35 images, could that be the problem?

    To be perfectly honest I have no idea where to start counting the lines. My first error says Line 37, Char 29 Error: Expected ']'
    I looked through all the ']'s and they all seem to be normal.

    Then when I rollover the thumbnails I get errors saying Object Expected. I am in the right Dir for the images, so why aren't they working?

    Oh, I am also using FP2000. I realize it's evil with code, but like I said, it works alone but not when I add it to the page I want it to work on.

    Sorry for posting the long script, but I am not sure what else to do...

    Forever in your gratitude!!
    Cat

    <script language="javascript" src="sniffer.js">

    //Top Navigational Bar III v3.4.1.1b (By BrotherCake @ [email protected])
    //Permission granted/modified by Dynamicdrive.com to include script in archive
    //For this and 100's more DHTML scripts, visit http://www.dynamicdrive.com/
    //This notice MUST stay intact for legal use
    </script>
    <script language="javascript1.2" src="custom.js"></script>
    <script language="javascript1.2" src="style.js"></script>
    <script 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
    ***********************************************/

    //Specify image paths and optional link (set link to "" for no link):
    var dynimages=new Array()
    dynimages[0]=["abbhal1.jpg"]
    dynimages[1]=["Abby.jpg"]
    dynimages[2]=["anniesit.jpg"]
    dynimages[3]=["anniestand.jpg", ""]
    dynimages[4]=["anniesnow.jpg", ""]
    dynimages[5]=["Bergen1.jpg", ""]
    dynimages[6]=["Bergen2.jpg", ""]
    dynimages[7]=["ChadeAB4mnth.jpg", ""]
    dynimages[8]=["ChadeAB4mnth2.jpg", ""]
    dynimages[9]=["Dacey.jpg", ""]
    dynimages[10]=["Dacey2.jpg", ""]
    dynimages[11]=["Dacey3.jpg", ""]
    dynimages[12]=[Dreysdale.jpg", ""]
    dynimages[13]=["Dreysdale2.jpg", ""]
    dynimages[14]=["Dreysdale3.jpg", ""]
    dynimages[15]=["Espresso.jpg", ""]
    dynimages[16]=["FozzieBearIL.gif", ""]
    dynimages[17]=["GeorgeMA.jpg", ""]
    dynimages[18]=["GracieMB.jpg", ""]
    dynimages[19]=["GracieMB16 wks.jpg", ""]
    dynimages[20]=["Jack.jpg", ""]
    dynimages[21]=["Kodiak.jpg", ""]
    dynimages[22]=["Kodiak17wks.jpg", ""]
    dynimages[23]=["Kodiak2.jpg", ""]
    dynimages[24]=["LolaNH.jpg", ""]
    dynimages[25]=["LolaNH11wks.jpg", ""]
    dynimages[26]=["LolaNH23wks.jpg", ""]
    dynimages[27]=["meesha.jpg", ""]
    dynimages[28]=["Rosie.jpg", ""]
    dynimages[29]=["SugarokDan.jpg", ""]
    dynimages[30]=["SugarokFanny.jpg", ""]
    dynimages[31]=["SugarokJessica.jpg", ""]
    dynimages[32]=["SugarokLoddi.jpg", ""]
    dynimages[33]=["uniBC4wks.jpg", ""]
    dynimages[34]=["uniBCadult.jpg", ""]
    dynimages[35]=["uniBC.jpg", ""]


    //Preload images ("yes" or "no"):
    var preloadimg="no"

    //Set optional link target to be added to all images with a link:
    var optlinktarget=""

    //Set image border width
    var imgborderwidth=0

    //Optionally, change 1.0 and 0.7 below to affect Wipe gradient size and duration in seconds in IE5.5+:
    var filterstring="progidXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)"

    ///////No need to edit beyond here/////

    if (preloadimg=="yes"){
    for (x=0; x<dynimages.length; x++){
    var myimage=new Image()
    myimage.src=dynimages[x][0]
    }
    }

    function returnimgcode(theimg){
    var imghtml=""
    if (theimg[1]!="")
    imghtml='<a href="'+theimg[1]+'" target="'+optlinktarget+'">'
    imghtml+='<img src="'+theimg[0]+'" border="'+imgborderwidth+'">'
    if (theimg[1]!="")
    imghtml+='</a>'
    return imghtml
    }

    function modifyimage(loadarea, imgindex){
    if (document.getElementById){
    var imgobj=document.getElementById(loadarea)
    if (imgobj.filters && window.createPopup){
    imgobj.style.filter=filterstring
    imgobj.filters[0].Apply()
    }
    imgobj.innerHTML=returnimgcode(dynimages[imgindex])
    if (imgobj.filters && window.createPopup)
    imgobj.filters[0].Play()
    return false
    }
    }

    </script>
    </head>
    <body bgcolor="#B19DBA" link="#800000" vlink="#660033" alink="#CC3300">
    <p align="center"><br>
    <div align="center">
    <center>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
    <td width="100%">
    <p align="center">
    <font face="Verdana" size="2">
    <img border="0" src="flcapg.jpg" width="250" height="100"></font><p align="center"><font size="2" face="Verdana">Members'
    own Finnish Lapphunds.</font><p align="center"><font face="Verdana" size="2">Roll your mouse over thumbnails for larger
    image.</font>
    <p>&nbsp;</td>
    </tr>
    </table>
    </center>
    </div>
    <hr>
    <p align="center">
    <font face="Verdana" size="2">
    <a href="#" onMouseover="modifyimage('dynloadarea', 0)"><img border="0" src="abbhalsm.jpg" alt="Abby &amp; Haley" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 1)"><img border="0" src="Abbsm.jpg" alt="Abby in snow" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 2)"><img border="0" src="annsm.jpg" alt="Annie" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 3)"><img border="0" src="annsm2.jpg" alt="Annie" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 4)"><img border="0" src="annsm4.jpg" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 5)"><img border="0" src="Bersm.jpg" alt="Bergen" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 6)"><img border="0" src="Bersm2.jpg" alt="Bergen puppy" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 7)"><img border="0" src="Chasm.jpg" alt="Chade" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 8)"><img border="0" src="Chasm2.jpg" alt="Chade" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 9)"><img border="0" src="daysm.jpg" alt="Dacey" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 10)"><img border="0" src="daysm2.jpg" alt="Dacey" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 11)"><img border="0" src="daysm3.jpg" alt="Dacey" width="45" height="50"></a></font></p>


    <p align="center">
    <font face="Verdana" size="2">
    <a href="#" onMouseover="modifyimage('dynloadarea', 12)"><img border="0" src="Dreysm.jpg" alt="Derysdale" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 13)"><img border="0" src="Dreysm2.jpg" alt="Dreysdale" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 14)"><img border="0" src="Dreysm3.jpg" alt="Dreysdale" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 15)"><img border="0" src="Espsm.jpg" alt="Espresso" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 16)"><img border="0" src="Fozsm.gif" alt="Fozzie-Bear" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 17)"><img border="0" src="Geosm.jpg" alt="George" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 18)"><img border="0" src="grasm.jpg" alt="Gracie" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 19)"><img border="0" src="grasm2.jpg" alt="Gracie" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 20)"><img border="0" src="Jacksm.jpg" alt="Jack" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 21)"><img border="0" src="Kodsm.jpg" alt="Kodiak" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 22)"><img border="0" src="Kodsm2.jpg" alt="Kodiak" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 23)"><img border="0" src="Kodsm3.jpg" alt="Kodiak" width="45" height="50"></a></font>
    <br>

    <p align="center">
    <font face="Verdana" size="2">
    <a href="#" onMouseover="modifyimage('dynloadarea', 24)"><img border="0" src="lolsm.jpg" alt="Lola" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 25)"><img border="0" src="Lolsm2.jpg" alt="Lola" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 26)"><img border="0" src="Lolsm3.jpg" alt="Lola" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 27)"><img border="0" src="meesm.jpg" alt="Meesha" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 28)"><img border="0" src="Rossm.jpg" alt="Rosie" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 29)"><img border="0" src="SugDansm.jpg" alt="Dan" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 30)"><img border="0" src="SugFansm.jpg" alt="Fanny" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 31)"><img border="0" src="SugJessm.jpg" alt="Jessica" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 32)"><img border="0" src="SugLodsm.jpg" alt="Loddi" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 33)"><img border="0" src="unism.jpg" alt="Uni puppy" width="45" height="50"></a>
    <a href="#" onMouseover="modifyimage('dynloadarea', 34)"><img border="0" src="unism2.jpg" alt="Uni" width="45" height="50"></a> <a href="#" onMouseover="modifyimage('dynloadarea', 35)"><img border="0" src="unism3.jpg" alt="Uni" width="45" height="50"></a><br></font></p>
    <br>

    <div id="dynloadarea" style="width:380px;height:340px"></div>


    </body>

    </html><script language="javascript1.2" src="menu.js"></script>Page with non-working script

  • #2
    I am blind - fixed it myself

    I was missing a quote. Stupid eyes. Oh well, thanks for letting me ask.

    Comment

    Working...
    X