Results 1 to 3 of 3

Thread: Scrollable content II Horizontal

  1. #1
    Join Date
    Jul 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Scrollable content II Horizontal

    Hello,

    I would like to see if it's possible to make the following script scroll horizontaly, I've been trying to change the variables but to no avail I'm afraid...

    http://www.dynamicdrive.com/dynamicindex11/scrollc2.htm

    Any help greatly appreciated!

    Regards,
    Andie

  2. #2
    Join Date
    Jul 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking

    Hello!

    Just a note to let you know I eventually sorted the answer out, thought I would post it in case it could be of any use for someone else.

    Regards,
    Andrea

    Replace the last script by this version:

    <script language="JavaScript1.2">
    if (iens6){
    var crossobj=document.getElementById? document.getElementById("content") : document.all.content
    var contentwidth=crossobj.offsetWidth
    }
    else if (ns4){
    var crossobj=document.nscontainer.document.nscontent
    var contentwidth=crossobj.clip.width
    }

    function moveleft(){
    if (iens6&&parseInt(crossobj.style.left)>=(contentwidth*(-1)+100))
    crossobj.style.left=parseInt(crossobj.style.left)-speed+"px"
    else if (ns4&&crossobj.left>=(contentwidth*(-1)+100))
    crossobj.left-=speed
    moveleftvar=setTimeout("moveleft()",20)
    }

    function moveright(){
    if (iens6&&parseInt(crossobj.style.left)<=0)
    crossobj.style.left=parseInt(crossobj.style.left)+speed+"px"
    else if (ns4&&crossobj.left<=0)
    crossobj.left+=speed
    moverightvar=setTimeout("moveright()",20)

    }

    function getcontent_width(){
    if (iens6)
    contentwidth=crossobj.offsetWidth
    else if (ns4)
    document.nscontainer.document.nscontent.visibility="show"
    }
    window.onload=getcontent_width
    </script>

  3. #3
    Join Date
    Nov 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    im looking to do this same thing, i've tried your above code but it doesnt work. inside of the ilayer i have a table with a whole bunch of <td>' containign thumbnails. i just want to scroll left and right. it goes right a little but not the whole way. how can i fix this?

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
  •