SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile problem with scroll menu

    ive installed a java scroll menu for thumbnails in my gallery here; http://claudiacrobatia.com/portraitscolor.html but as you can see there is a scrollbar on the bottom of the site which is not supposed to be there. im pretty certain its because of the java menu, like the width of the total thumbnails length is stored there. i hope someone can help me how to get rid of it! the only thing i could find is when i remove <NOBR>&</NOBR> the scroll bar does indeed go away but then the menu doesnt scroll to the rest of the thumbnails anymore...
    heres the code;


    /***********************************************
    * Scrollable Menu Links- 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
    ***********************************************/

    //configure path for left and right arrows
    var goleftimage='images/arrowlinks.jpg'
    var gorightimage='images/arrowrechts.jpg'
    //configure menu width (in px):
    var menuwidth=843
    //configure menu height (in px):
    var menuheight=75
    //Specify scroll buttons directions ("normal" or "reverse"):
    var scrolldir="normal"
    //configure scroll speed (1-10), where larger is faster
    var scrollspeed=8
    //specify menu content
    var menucontents='<nobr><a href="images/portraits/color/1.html" target="gal"><img src="images/thumbs/portraitscolor/1.jpg" border="0"></a> <a href="images/portraits/color/2.html" target="gal"><img src="images/thumbs/portraitscolor/2.jpg" border="0"></a> <a href="images/portraits/color/3.html" target="gal"><img src="images/thumbs/portraitscolor/3.jpg" border="0"></a> <a href="images/portraits/color/4.html" target="gal"><img src="images/thumbs/portraitscolor/4.jpg" border="0"></a> <a href="images/portraits/color/5.html" target="gal"><img src="images/thumbs/portraitscolor/5.jpg"border="0"></a> <a href="images/portraits/color/6.html" target="gal"><img src="images/thumbs/portraitscolor/6.jpg" border="0"></a> <a href="images/portraits/color/7.html" target="gal"><img src="images/thumbs/portraitscolor/7.jpg" border="0"></a> <a href="images/portraits/color/8.html" target="gal"><img src="images/thumbs/portraitscolor/8.jpg" border="0"></a> <a href="images/portraits/color/9.html" target="gal"><img src="images/thumbs/portraitscolor/9.jpg" border="0"></a> <a href="images/portraits/color/10.html" target="gal"><img src="images/thumbs/portraitscolor/10.jpg" border="0"></a> <a href="images/portraits/color/11.html" target="gal"><img src="images/thumbs/portraitscolor/11.jpg" border="0"></a> <a href="images/portraits/color/12.html" target="gal"><img src="images/thumbs/portraitscolor/12.jpg" border="0"></a> <a href="images/portraits/color/13.html" target="gal"><img src="images/thumbs/portraitscolor/13.jpg" border="0"></a> <a href="images/portraits/color/14.html" target="gal"><img src="images/thumbs/portraitscolor/14.jpg" border="0"></a> <a href="images/portraits/color/15.html" target="gal"><img src="images/thumbs/portraitscolor/15.jpg" border="0"></a> <a href="images/portraits/color/16.html" target="gal"><img src="images/thumbs/portraitscolor/16.jpg" border="0"></a> <a href="images/portraits/color/17.html" target="gal"><img src="images/thumbs/portraitscolor/17.jpg" border="0"></a> <a href="images/portraits/color/18.html" target="gal"><img src="images/thumbs/portraitscolor/18.jpg" border="0"></a> <a href="images/portraits/color/19.html" target="gal"><img src="images/thumbs/portraitscolor/19.jpg" border="0"></a> <a href="images/portraits/color/20.html" target="gal"><img src="images/thumbs/portraitscolor/20.jpg" border="0"></a> <a href="images/portraits/color/21.html" target="gal"><img src="images/thumbs/portraitscolor/21.jpg" border="0"></a> <a href="images/portraits/color/22.html" target="gal"><img src="images/thumbs/portraitscolor/22.jpg" border="0"></a> <a href="images/portraits/color/23.html" target="gal"><img src="images/thumbs/portraitscolor/23.jpg" border="0"></a> <a href="images/portraits/color/25.html" target="gal"><img src="images/thumbs/portraitscolor/25.jpg" border="0"></a> </nobr>'


    ////NO NEED TO EDIT BELOW THIS LINE////////////

    var iedom=document.all||document.getElementById
    var leftdircode='onMouseover="moveright()" onMouseout="clearTimeout(righttime)"'
    var rightdircode='onMouseover="moveleft()" onMouseout="clearTimeout(lefttime)"'
    if (scrolldir=="reverse"){
    var tempswap=leftdircode
    leftdircode=rightdircode
    rightdircode=tempswap
    }
    if (iedom)
    document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100;left:-5000">'+menucontents+'</span>')
    var actualwidth=''
    var cross_scroll, ns_scroll
    var loadedyes=0
    function fillup(){
    if (iedom){
    cross_scroll=document.getElementById? document.getElementById("test2") : document.all.test2
    cross_scroll.innerHTML=menucontents
    actualwidth=document.all? cross_scroll.offsetWidth : document.getElementById("temp").offsetWidth
    }
    else if (document.layers){
    ns_scroll=document.ns_scrollmenu.document.ns_scrollmenu2
    ns_scroll.document.write(menucontents)
    ns_scroll.document.close()
    actualwidth=ns_scroll.document.width
    }
    loadedyes=1
    }
    window.onload=fillup

    function moveleft(){
    if (loadedyes){
    if (iedom&&parseInt(cross_scroll.style.left)>(menuwidth-actualwidth)){
    cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed+"px"
    }
    else if (document.layers&&ns_scroll.left>(menuwidth-actualwidth))
    ns_scroll.left-=scrollspeed
    }
    lefttime=setTimeout("moveleft()",50)
    }

    function moveright(){
    if (loadedyes){
    if (iedom&&parseInt(cross_scroll.style.left)<0)
    cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed+"px"
    else if (document.layers&&ns_scroll.left<0)
    ns_scroll.left+=scrollspeed
    }
    righttime=setTimeout("moveright()",50)
    }


    if (iedom||document.layers){
    with (document){
    write('<table border="0" cellspacing="0" cellpadding="2">')
    write('<td valign="middle"><a href="#" '+leftdircode+'><img src="'+goleftimage+'"border=0></a> </td>')
    write('<td width="'+menuwidth+'px" valign="top">')
    if (iedom){
    write('<div style="position:relative;width:'+menuwidth+'px;height:'+menuheight+'px;overflow:hidden;">')
    write('<div id="test2" style="position:absolute;left:0;top:0">')
    write('</div></div>')
    }
    else if (document.layers){
    write('<ilayer width='+menuwidth+' height='+menuheight+' name="ns_scrollmenu">')
    write('<layer name="ns_scrollmenu2" left=0 top=0></layer></ilayer>')
    }
    write('</td>')
    write('<td valign="middle"> <a href="#" '+rightdircode+'>')
    write('<img src="'+gorightimage+'"border=0></a>')
    write('</td></table>')
    }
    }

    </script>

  2. #2
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    still having this problem... hope someone can help me!


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
  •