PDA

View Full Version : Conveyor Belt slideshow script (help editing)



chem3
12-27-2005, 01:22 PM
Hello,

I am new at this forum and on my first post here I have some questions about one of DD's scripts (Conveyor Belt slideshow script).
Here's the script:


<script type="text/javascript">

//Specify the slider's width (in pixels)
var sliderwidth="700px"
//Specify the slider's height
var sliderheight="82px"
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=3
//configure background color:
slidebgcolor="#EAEAEA"

//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<a href="http://"><img src="http://chem3.jeeran.com/IMG.JPG" border=1></a>'

//Specify gap between each image (use HTML):
var imagegap=" "

//Specify pixels gap between each slideshow rotation (use integer):
var slideshowgap=0

.......the rest found Here (http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm)

</script>

See an example of what I am tring to do here:
Click Here (http://chem3.jeeran.com/slide.htm)

And my questions are:

1- How can I set the width of the scroller in terms of percentage instead of pixels? I want the width to be 100% and not in pixels.

2- I want to use the scroller to scroll only one image (as you can see on the page above) and I want the gap between the right and left ends of the image to be zero (continuous with no gaps at all). But in the scroller above (see the link above) the first gap between the ends of the image would be 0 (no gap) but the gap would appear between the next ends, then it disappears (no gap) then there's a gap, no gap, gap....
How to make it with no gaps at all?

3- If you use IE, and if you visit the page that includes the script ( Click Here (http://chem3.jeeran.com/slide.htm) ) your IE browser will tell you that the script was disabled for security reasons and it will not work till you allow it. But if you visit the following page (which includes the same script) it will load normally and IE will not block the script, see the page: Click Here (http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm).
How can I make the script load normally in IE without getting it blocked?

Thanks in advance! and sorry for long questions!

jscheuer1
12-27-2005, 09:35 PM
Number 3 first. Not happening here in IE (although there was a pop-up blocking notification) and not happening in a live demo of the below that I set up for a test. Generally, that only happens locally, once the page is live, it will not trigger that security alert. Try this version of the script (I've set the gaps in the configuration - highlighted red, allowing percent width was a major mod - highlight green):


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>
<body>
<script type="text/javascript">

/***********************************************
* Conveyor belt slideshow script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/


//Specify the slider's width (in pixels or %)
var sliderwidth="100%"
//Specify the slider's height (in pixels)
var sliderheight="82px"
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=3
//configure background color:
slidebgcolor="#EAEAEA"

//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<a href="http://"><img src="http://chem3.jeeran.com/IMG.JPG" border=1></a>'

//Specify gap between each image (use HTML):
var imagegap=""

//Specify pixels gap between each slideshow rotation (use integer):
var slideshowgap=-4


////NO NEED TO EDIT BELOW THIS LINE////////////
var resizeFlag=sliderwidth.indexOf('%')!==-1? 1 : 0
if (resizeFlag){
var percentWidth=parseInt(sliderwidth, 10)/100
sliderwidth=parseInt(sliderwidth, 10)*5+'px'

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function widenIt(){
var allWide=window.innerWidth? window.innerWidth : iecompattest().clientWidth
var firstContainer=document.getElementById? document.getElementById("firstC") : document.all.firstC
firstContainer.style.width=allWide*percentWidth-20+'px'
}

onresize=widenIt;
}

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){
if (resizeFlag)
widenIt()
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 id="firstC" 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>
<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://dynamicdrive.com">Dynamic Drive</a></font></p>
</body>
</html>

chem3
12-28-2005, 09:45 AM
Thanks for your help John!

But I have further questions please!

1- I want to use that slider (scroller) more than once (say 4 times) on a web page, but in different places, so each time the script would be the same except the line that locates the image
leftrightslide[0]='<a href="http://"><img src="http://chem3.jeeran.com/IMG.JPG" border=1></a>'
so, do I have to include the whole same script each time or there is some way to use the same script many times, but each time with a different "image code"? Sorry! I am a beginner!

2- May I delete the last code of the script which includes a link to DD:

<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
<a href="http://dynamicdrive.com">Dynamic Drive</a></font></p>

But I'll keep the notice:


/***********************************************
* Conveyor belt slideshow script- &#169; Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

Thanks!

jscheuer1
12-28-2005, 10:58 AM
Number 2 first this time. Yes, that's fine and dandy with DD as per their 'terms of use'.

Number 1 has no real easy solution. I will look into modding this script for multiple use but, that is quite a bit of work and my skills are not very broad in that area yet. I've done it before but, next time I want to use a new method that I am still learning. It is something I want to learn after seeing DD do it with the Ultimate Fade In Slideshow script. What I really need is a script that it would be worth doing this to that isn't too involved, this script might provide that, we'll see. In the mean time, the easiest way to get multiple copies of this sort of script on a page is to actually use separate pages and have only one copy of the script on your page. The others, as I say, would be on separate pages and show through onto you main or top page via iframes.

chem3
12-28-2005, 02:38 PM
Ok!
I think there is a little problem with the gap code in the altered script above.
When you set the slideshowgap to -4 insted of 0, then instead of having "no gap, gap, no gap,..." between the ends of the image, now there is "4 pixels deducted from right end with no gap, OK with no gap, 4 pixels deducted from right end with no gap, no gap, 4 pixels deducted from right end with no gap, no gap,..." See Here (http://chem3.jeeran.com/slider.htm)

I want to scroll a complete one image with "no gap, no gap, no gap, no gap,..." ends.
What to do?

chem3
12-29-2005, 08:17 AM
Anyone!

chem3
12-29-2005, 08:58 AM
Another little problem:

How can I make the background color cover all the 100% width? HERE (http://chem3.jeeran.com/slider.htm)

jscheuer1
12-29-2005, 09:43 AM
Ok, where we have:


var resizeFlag=sliderwidth.indexOf('%')!==-1? 1 : 0
if (resizeFlag){
var percentWidth=parseInt(sliderwidth, 10)/100
sliderwidth=parseInt(sliderwidth, 10)*5+'px'

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function widenIt(){
var allWide=window.innerWidth? window.innerWidth : iecompattest().clientWidth
var firstContainer=document.getElementById? document.getElementById("firstC") : document.all.firstC
firstContainer.style.width=allWide*percentWidth-20+'px'
}

onresize=widenIt;
}

Change it to:


var resizeFlag=sliderwidth.indexOf('%')!==-1? 1 : 0
if (resizeFlag){
var percentWidth=parseInt(sliderwidth, 10)/100

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function widenIt(){
var allWide=window.innerWidth? window.innerWidth : iecompattest().clientWidth
var firstContainer=document.getElementById? document.getElementById("firstC") : document.all.firstC
var nextContainer=document.getElementById? document.getElementById("nextC") : document.all.nextC
firstContainer.style.width=allWide*percentWidth-20+'px'
nextContainer.style.width=allWide*percentWidth-20+'px'
}

onresize=widenIt;
}

and where it has:


write('<div id="firstC" 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">')

Make it:


write('<div id="firstC" style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
write('<div id="nextC" style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')

That will take care of the background issues. Now, about that pesky gap. There were two ways I thought it would look good, depending upon one's opinion. One is where the two images touch each other, the other is where the two images overlap by 1 pixel, making the adjacent border width look the same as the the top and bottom border widths, I like this second option better. Either way, find this line in the code (be careful, there are a few similar looking lines to this one, but only one exactly like it):


cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"

Change it to this:


cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap-3+"px"

Then set the:


//Specify pixels gap between each slideshow rotation (use integer):
var slideshowgap=-1

for the 1 pixel overlap, or 0 for the two images to touch each other.

chem3
12-29-2005, 12:56 PM
Now all issues solved.
Many thanks John!

chem3
12-30-2005, 11:41 AM
Now I have an image scroller (slider) that looks fine and scrolls smoothly in IE, but (I hate to say that word) in FireFox browser it scrolls roughly. Is there any way to make it (modify the script to) scroll smoothly in both IE and FF (also in NS and Opera, but I haven't tried it in either of those two) browsers?

Take a look at the final result HERE (http://chem3.jeeran.com/scroller.htm)

jscheuer1
12-30-2005, 05:26 PM
Try closing all other browser windows that have something moving in them, then try the scroller in FF. When I did that, it was as smooth as IE. Generally FF (and Mozilla in general) browsers are not quite as efficient as IE when moving things, or changing any values incrementally and in rapid succession via javascript. However, if you give them a chance, by making them the only browser open (as is usually the case when someone surfs to you site), they often manage quite well.

chem3
12-31-2005, 02:16 PM
OK! I am facing another little problem (This is the last one. I promise!):

I want to put that image slider (with 100% width) in the following table: See the table here (http://chem3.jeeran.com/Table.htm).
But, when I did so the right end of the table would extend for several pixels (not sure how many). See the result here (http://chem3.jeeran.com/Table2.htm).

So, what is the problem? Why does that happen? How can I make the slider cover all the 100% width of the table and keep the borders (right border) of it as in HERE (http://chem3.jeeran.com/Table.htm) without getting the right border of the table extended to the right?

And sorry for disturbance, John!

jstgermain
12-31-2005, 06:00 PM
it seems that you are using cell padding. that could be the problem:

your code:


<table width="100%" height="145" border="0" align="center" cellpadding="1" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td height="25" align="right" valign="top">
<table border="0" cellspacing="1" cellpadding="1" >
<tr>
<td>&nbsp;</td>
<td><img src="http://www.jeeran.com/im/close.gif" width="18" height="16" border="0" onClick="MM_showHideLayers('FloatMail','','hide');moveback();"></td>
</tr>
</table></td>
</tr>
<tr>
<td id = "contentcell" width="1" height="1" align="center" valign="top" bgcolor="#FFFFFF" style="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; VERTICAL-ALIGN: top; PADDING-TOP: 1px;">
<iframe src="" width="100" height="100" frameborder="0" scrolling="no" id="adframe" name="adframe"></iframe>
</td>
</tr>
<tr>
<td height="25" align="right" valign="top">
<table border="0" cellspacing="1" cellpadding="1">
<tr>
<td>&nbsp;</td>
<td><img src="http://www.jeeran.com/im/close.gif" width="18" height="16" border="0" onClick="MM_showHideLayers('FloatMail','','hide');moveback();"></td>
</tr>
</table></td>
</tr>
</table>


replace with:


<table width="100%" height="145" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td height="25" align="right" valign="top">
<table border="0" cellspacing="1" cellpadding="1" >
<tr>
<td>&nbsp;</td>
<td><img src="http://www.jeeran.com/im/close.gif" width="18" height="16" border="0" onClick="MM_showHideLayers('FloatMail','','hide');moveback();"></td>
</tr>
</table></td>
</tr>
<tr>
<td id = "contentcell" width="1" height="1" align="center" valign="top" bgcolor="#FFFFFF" style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; VERTICAL-ALIGN: top; PADDING-TOP: 0px;">
<iframe src="" width="100" height="100" frameborder="0" scrolling="no" id="adframe" name="adframe"></iframe>
</td>
</tr>
<tr>
<td height="25" align="right" valign="top">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
<td><img src="http://www.jeeran.com/im/close.gif" width="18" height="16" border="0" onClick="MM_showHideLayers('FloatMail','','hide');moveback();"></td>
</tr>
</table></td>
</tr>
</table>


if that doesnt work, let me know and i will copy the code and fix it myself, but i am to tired to do that right now. :) hope it works. re-post soon letting us know.

jscheuer1
12-31-2005, 09:44 PM
Cell padding shouldn't have anything to do with it. OK, I had made some refinements to the script that weren't essential but, this gives me an opportunity to incorporate them. Some were just for simplicity, one was for increased compatibility in Opera. Combining those with the upgrade to fit this script inside an element (other than the body) and still use percent width, involves too many changes to lay out piecemeal. Also, I'd appreciate your changing the credit to:


/***********************************************
* Conveyor belt slideshow script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
* Modified for percentage width and Opera bug fix by
* jscheuer1 in http://www.dynamicdrive.com/forums
***********************************************/

So, here is the entire script from the do not edit line to the end, the configuration area remains the same:


////NO NEED TO EDIT BELOW THIS LINE////////////
if (/%/.test(sliderwidth)){
var percentWidth=parseInt(sliderwidth, 10)/100

function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}

function findParentWidth(){
var topContainer=document.getElementById? document.getElementById("trueC") : document.all.trueC
while(typeof topContainer.offsetWidth=='undefined'||topContainer.offsetWidth==0)
topContainer=topContainer.parentNode
if (topContainer.tagName.toLowerCase()=='body'||topContainer.tagName.toLowerCase()=='html')
returnVal=window.innerWidth? window.innerWidth-16 : iecompattest().clientWidth-20;
else
returnVal=topContainer.offsetWidth;
return returnVal;
}

function widenIt(isresize){
var firstContainer=document.getElementById? document.getElementById("firstC") : document.all.firstC
var nextContainer=document.getElementById? document.getElementById("nextC") : document.all.nextC
if (typeof isresize!=='undefined')
firstContainer.style.width=nextContainer.style.width=0
var allWide=findParentWidth()
firstContainer.style.width=nextContainer.style.width=allWide*percentWidth+'px'
}

onresize=function(){widenIt('r');}
}

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){
if (/%/.test(sliderwidth))
widenIt()
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-3+"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){
if (window.opera)
write('<div style="overflow:hidden;">')
write('<table id="trueC" border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div id="firstC" style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
write('<div id="nextC" 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>')
}
write('</td></table>')
if (window.opera)
write('</div>')
}
}
</script>

chem3
01-01-2006, 11:22 AM
OK John! It worked, but still, there is a little extension to the right!
Could you see what is the problem please! See Here (http://chem3.jeeran.com/Table3.htm)

(Credit will be changed to as you mentioned above :) )

jscheuer1
01-01-2006, 05:05 PM
This is more of a layout problem than anything to do with the script itself, although there may be a way to prevent the script from doing this in this sort of layout, I'll have to see. Then again it could be only a layout problem. In any case, if you change this:


<TABLE class=tborder cellSpacing=0 cellPadding=0 width="100%" border=1 bordercolor="#0C8AD2">

to this:


<TABLE style="border-collapse:collapse;" class=tborder cellSpacing=0 cellPadding=0 width="100%" border=1 bordercolor="#0C8AD2">

Things will line up just fine.

chem3
01-02-2006, 09:12 AM
All seems to work fine now.
Thanks for your great help John!
Also, thanks to jstgermain for trying to help!

Odiii
01-06-2009, 10:14 AM
Hello,
sry for my bad english, iam german:p

I have a problem.
I want to stretch the width, like the ideas on the last posts.
But nothing work :confused:

Hier is my Code:


<table class="tablebg" cellspacing="1" width="100%">
<tr>
<th>Partner</th>
</tr>
<tr class="row1">
<td>
<!-- Hier Code einfügen -->
<center>
<script type="text/javascript">

/***********************************************
* Conveyor belt slideshow script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/


//Specify the slider's width (in pixels)
var sliderwidth="600px"
//Specify the slider's height
var sliderheight="65px"
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=1
//configure background color:
slidebgcolor="#EAEAEA"

//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<a href="http://......"><img src="http://........." border=1></a>'
leftrightslide[1]='<a href="http://..."><img src="http://........." border=1></a>'


//Specify gap between each image (use HTML):
var imagegap=" "

//Specify pixels gap between each slideshow rotation (use integer):
var slideshowgap=5


////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>
</center>

</td>
</tr>
</table>
<br />

Can anyone help me?
All german boards cant it :p

Greetz
Odiii

Odiii
01-06-2009, 05:45 PM
Nobody have an idea? :(

jscheuer1
01-06-2009, 08:18 PM
Sometimes it can take more than a few hours to get an answer around here. And it helps if you post a new thread for a new question. While doing so, please observer the guidelines including:

http://www.dynamicdrive.com/forums/showthread.php?t=6

A link to your page would help to:

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