Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Javascript - moving gallery problem

  1. #1
    Join Date
    Jun 2008
    Posts
    6
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Javascript - moving gallery problem

    hello

    i have a moving javascript gallery and i would like to copy the gallery seven times and place it on the same site, just another position. The pictures the gallery shows are different but the code ist the same.

    My problem is now, that just the first gallery shows the pictures and the others are not visible/working.

    Do I have to identify each gallery (and how) or what should I do/try ?
    Here are my site

    This is an orginal DD-Srcipt, but i forget the name of this script.
    And here are my Code:
    Code:
    <script type="text/javascript">
    
    
    //Specify the slider's width (in pixels)
    var sliderwidth="830px"
    //Specify the slider's height
    var sliderheight="600px"
    //Specify the slider's slide speed (larger is faster 1-10)
    var slidespeed=2
    //configure background color:
    slidebgcolor="transparent"
    
    //Specify the slider's images
    var leftrightslide=new Array()
    var finalslide=''
    rightleftslide[0]='<a href="#"><img src="rollerbilder/700/ygm_01_firestorm_black_700_2.jpg" style="border: 5px #fff solid; margin-right: 10px;"></a>'
    rightleftslide[1]='<a href="#"><img src="rollerbilder/700/ygm_01_firestorm_blue_700_2.jpg" style="border: 5px #fff solid; margin-right: 10px;"></a>'
    leftrightslide[2]='<a href="#"><img src="rollerbilder/700/ygm_01_firestorm_red_700_2.jpg" style="border: 5px #fff solid; margin-right: 10px;"></a>'
    leftrightslide[3]='<a href="#"><img src="rollerbilder/700/ygm_01_ice_700_2.jpg" style="border: 5px #fff solid; margin-right: 10px;"></a>'
    leftrightslide[4]='<a href="#"><img src="rollerbilder/700/ygm_01_racer_black_700_2.jpg" style="border: 5px #fff solid; margin-right: 10px;"></a>'
    leftrightslide[5]='<a href="#"><img src="rollerbilder/700/ygm_01_racer_red_700_2.jpg" style="border: 5px #fff solid; margin-right: 10px;"></a>'
    leftrightslide[6]='<a href="#"><img src="rollerbilder/700/ygm_01_racer_black_700_2.jpg" style="border: 5px #fff solid; margin-right: 10px;"></a>'
    leftrightslide[7]='<a href="#"><img src="rollerbilder/700/ygm_01_racer_blue_700_2.jpg" style="border: 5px #fff solid; margin-right: 10px;"></a>'
    
    
    
    //Specify gap between each image (use HTML):
    var imagegap=""
    
    //Specify pixels gap between each slideshow rotation (use integer):
    var slideshowgap=0
    
    
    ////NO NEED TO EDIT BELOW THIS LINE////////////
    
    var copyspeed=slidespeed
    leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'
    var iedom=document.all||document.getElementById
    if (iedom)
    document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+leftrightslide+'</span>')
    var actualwidth=''
    var cross_slide, ns_slide
    
    function fillup(){
    if (iedom){
    cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
    cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3
    cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
    actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
    cross_slide2.style.left=actualwidth+slideshowgap+"px"
    }
    else if (document.layers){
    ns_slide=document.ns_slidemenu.document.ns_slidemenu2
    ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
    ns_slide.document.write(leftrightslide)
    ns_slide.document.close()
    actualwidth=ns_slide.document.width
    ns_slide2.left=actualwidth+slideshowgap
    ns_slide2.document.write(leftrightslide)
    ns_slide2.document.close()
    }
    lefttime=setInterval("slideleft()",30)
    }
    window.onload=fillup
    
    function slideleft(){
    if (iedom){
    if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
    cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"
    else
    cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"
    
    if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
    cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"
    else
    cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+"px"
    
    }
    else if (document.layers){
    if (ns_slide.left>(actualwidth*(-1)+8))
    ns_slide.left-=copyspeed
    else
    ns_slide.left=ns_slide2.left+actualwidth+slideshowgap
    
    if (ns_slide2.left>(actualwidth*(-1)+8))
    ns_slide2.left-=copyspeed
    else
    ns_slide2.left=ns_slide.left+actualwidth+slideshowgap
    }
    }
    
    
    if (iedom||document.layers){
    with (document){
    document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
    if (iedom){
    write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
    write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
    write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>')
    write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>')
    write('</div></div>')
    }
    else if (document.layers){
    write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>')
    write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
    write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>')
    write('</ilayer>')
    }
    document.write('</td></table>')
    }
    }
    </script>
    Thanks
    Last edited by bullsey; 06-22-2008 at 05:58 PM.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Please take a look at this(#4):
    http://www.dynamicdrive.com/notice.htm
    You are breaking one if the terms of use.
    Here is the page that you got that script from, you must leave credit:
    http://www.dynamicdrive.com/dynamici...rightslide.htm

    Please post a link to the page on your site that contains the problematic script so we can check it out.

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.
    Last edited by Nile; 06-22-2008 at 08:15 PM.
    Jeremy | jfein.net

  3. The Following User Says Thank You to Nile For This Useful Post:

    bullsey (06-22-2008)

  4. #3
    Join Date
    Jun 2008
    Posts
    6
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    i`m sorry, i just reduced the code for clearness.
    The copyright is still inside.

    please help me.

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Code:
    rightleftslide[0]
    rightleftslide[1]
    leftrightslide[2]
    leftrightslide[3]
    leftrightslide[4]
    Are you mildly dyslexic?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    bullsey (06-22-2008)

  7. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by bullsey View Post
    i`m sorry, i just reduced the code for clearness.
    The copyright is still inside.

    please help me.
    I don't see the credit on your page (the one you linked to in your post) either.

    Your page is in violation of Dynamic Drive's usage terms, which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.


    Also we need that link to the script demo on DD here:

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. The Following User Says Thank You to jscheuer1 For This Useful Post:

    bullsey (06-22-2008)

  9. #6
    Join Date
    Jun 2008
    Posts
    6
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    it`s inside... but the site was not updatet.. now it is....

    I forget name of this DD Script, so i can`t post the name of the DD-Script demo Site..


    sry for my bad english...
    Last edited by bullsey; 06-22-2008 at 07:18 PM.

  10. #7
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    You got it from this page:
    http://www.dynamicdrive.com/dynamici...rightslide.htm
    Conveyor Belt Slideshow.
    Jeremy | jfein.net

  11. #8
    Join Date
    Jun 2008
    Posts
    6
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    I tested it with the original DD-Script, if i put the same code on different positions, it does not working...only if i placed it one time.
    Can anybody help me? its realy imposible...
    Last edited by bullsey; 06-22-2008 at 09:47 PM.

  12. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Actually it is working, sort of. You should use your own images though, as Dynamic Drive will block use of their images from a URL offsite. (Dynamic Drive is not an image host)

    There are other issues, but using your own images should get the thing working more or less.

    One of the other issues is that you have a body onload event:

    Code:
    <body onload="MM_preloadImages('bilder/head_nav_button_01_on.gif','bilder/head_nav_button_02_on.gif','bilder/head_nav_button_03_on.gif','bilder/head_nav_button_04_on.gif')">
    That's fine, but it is being overridden by the window.onload of the script:

    Code:
    window.onload=fillup
    You should remove:

    Code:
    window.onload=fillup
    from the script and add it to your body onload:

    Code:
    <body onload="fillup();MM_preloadImages('bilder/head_nav_button_01_on.gif','bilder/head_nav_button_02_on.gif','bilder/head_nav_button_03_on.gif','bilder/head_nav_button_04_on.gif')">
    There appear perhaps to be minor layout issues as well, but these (if any) will only be truly apparent once you have your own images setup with the script.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  13. The Following User Says Thank You to jscheuer1 For This Useful Post:

    bullsey (06-23-2008)

  14. #10
    Join Date
    Jun 2008
    Posts
    6
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    thanks jscheuer1,

    i tested it, but only one is working... I can`t setup my own script...
    Can anybody show me a script like this, which i can use more then one time?

    its realy important ...

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
  •