Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #17201
| From | Fokke Nauta <fnautaNO@SPAMsolfon.nl> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Continuous vertical marquee doesn't work properly |
| Date | 2012-11-13 15:34 +0100 |
| Message-ID | <agf43qF5b7kU1@mid.individual.net> (permalink) |
Hi all,
I use a script from www.dynamicdrive.com for a continous vertical
marquee, called Cross browser Marquee II. It's the only javascript I can
find for this purpose.
I use it to scroll 8 images vertically, in a continuous way.
It works, but on the second passage all images are stuck together and
have a white background behind them which is wider than the images
themselves. This happens on all even passages. The first and all odd
passages show correctly.
I guess this problem is due to the script. Perhaps someone is able to
correct this?
You can watch this at http://www.pc3.nl/users/dictee. The images scroll
in the left hand column. You can find the script I use underneath the
dashed line.
Many thanks for your help beforehand.
With best regards,
Fokke Nauta
-------------------------------------------------------------------
<script type="text/javascript">
/*
Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS, visit
http://www.dynamicdrive.com
Modified by jscheuer1 for continuous content. Credit MUST stay intact
for use
*/
//Specify the marquee's width (in pixels)
var marqueewidth="180px"
//Specify the marquee's height
var marqueeheight="770px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=1
//Specify initial pause before scrolling in milliseconds
var initPause=2000
//Specify start with Full(1)or Empty(0) Marquee
var full=1
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1
//Specify Break characters for IE as the two iterations
//of the marquee, if text, will be too close together in IE
var iebreak='<p></p>'
//Specify the marquee's content
//Keep all content on ONE line, and backslash any single quotations (ie:
that\'s great):
var marqueecontent='<p align="center"><a
href="http://www.amersfoort.rabobank.nl" target="_blank"><img
src="img/sponsors/LogoRabo.jpg" width="160" height="193"
border="0"></a></p><p align="center"><a href="http://www.amersfoort.nl/"
target="_blank"><img src="img/sponsors/LogoAmersfoort.jpg" width="160"
height="114" border="0"></a></p><p align="center"><a
href="http://www.progressomedia.nl/" target="_blank"><img
src="img/sponsors/imago.png" width="160" height="37"
border="0"></a></p><p align="center"><a
href="http://www.algemeneboekhandel.nl/subsite.cfm/?Contact_4"
target="_blank"><img src="img/sponsors/dab.jpg" width="160" height="69"
border="0"></a></p><p align="center"><a
href="http://www.boekhandelveenendaal.nl/" target="_blank"><img
src="img/sponsors/veenendaal.jpg" width="160" height="92"
border="0"></a></p><p align="center"><a
href="http://www.joeymercuur.nl/" target="_blank"><img
src="img/sponsors/mercuur.jpg" width="160" height="107"
border="0"></a></p><p align="center"><a href="http://www.vandale.nl/"
target="_blank"><img src="img/sponsors/vandale.jpg" width="160"
height="51" border="0"></a></p><p align="center"><a
href="http://www.hetnieuweeemland.nl/HetNieuweEemland/Home.aspx"
target="_blank"><img src="img/sponsors/LogoNieuweEemland.jpg"
width="160" height="71" border="0"></a></p>'
////NO NEED TO EDIT BELOW THIS LINE////////////
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
var actualheight=''
var cross_marquee, cross_marquee2, ns_marquee
function populate(){
if (iedom){
var lb=document.getElementById&&!document.all? '' : iebreak
cross_marquee=document.getElementById?
document.getElementById("iemarquee") : document.all.iemarquee
cross_marquee2=document.getElementById?
document.getElementById("iemarquee2") : document.all.iemarquee2
cross_marquee.style.top=(full==1)? '8px' : parseInt(marqueeheight)+8+"px"
cross_marquee2.innerHTML=cross_marquee.innerHTML=marqueecontent+lb
actualheight=cross_marquee.offsetHeight
cross_marquee2.style.top=(parseInt(cross_marquee.style.top)+actualheight+8)+"px"
//indicates following #1
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee2
ns_marquee.top=parseInt(marqueeheight)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualheight=ns_marquee.document.height
}
setTimeout('lefttime=setInterval("scrollmarquee()",20)',initPause)
}
window.onload=populate
function scrollmarquee(){
if (iedom){
if (parseInt(cross_marquee.style.top)<(actualheight*(-1)+8))
cross_marquee.style.top=(parseInt(cross_marquee2.style.top)+actualheight+8)+"px"
if (parseInt(cross_marquee2.style.top)<(actualheight*(-1)+8))
cross_marquee2.style.top=(parseInt(cross_marquee.style.top)+actualheight+8)+"px"
cross_marquee2.style.top=parseInt(cross_marquee2.style.top)-copyspeed+"px"
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
}
else if (document.layers){
if (ns_marquee.top>(actualheight*(-1)+8))
ns_marquee.top-=copyspeed
else
ns_marquee.top=parseInt(marqueeheight)+8
}
}
if (iedom||document.layers){
with (document){
if (iedom){
write('<div
style="position:relative;width:'+marqueewidth+';height:'+marqueeheight+';overflow:hidden"
onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
write('<div id="iemarquee"
style="position:absolute;left:10px;top:10px;width:100%;">')
write('</div><div id="iemarquee2"
style="position:absolute;left:10px;top:10px;width:100%;z-index:100;background:white;">')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+marqueewidth+' height='+marqueeheight+'
name="ns_marquee">')
write('<layer name="ns_marquee2" width='+marqueewidth+'
height='+marqueeheight+' left=0 top=0 onMouseover="copyspeed=pausespeed"
onMouseout="copyspeed=marqueespeed"></layer>')
write('</ilayer>')
}
}
}
</script>
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
Continuous vertical marquee doesn't work properly Fokke Nauta <fnautaNO@SPAMsolfon.nl> - 2012-11-13 15:34 +0100
Re: Continuous vertical marquee doesn't work properly SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-11-13 17:37 +0100
Re: Continuous vertical marquee doesn't work properly Fokke Nauta <fnautaNO@SPAMsolfon.nl> - 2012-11-13 17:54 +0100
Re: Continuous vertical marquee doesn't work properly Fokke Nauta <fnautaNO@SPAMsolfon.nl> - 2012-11-14 08:33 +0100
Re: Continuous vertical marquee doesn't work properly "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-14 10:31 +0100
Re: Continuous vertical marquee doesn't work properly Fokke Nauta <fnautaNO@SPAMsolfon.nl> - 2012-11-14 10:41 +0100
Re: Continuous vertical marquee doesn't work properly "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-14 11:24 +0100
Re: Continuous vertical marquee doesn't work properly Fokke Nauta <fnautaNO@SPAMsolfon.nl> - 2012-11-14 13:35 +0100
Re: Continuous vertical marquee doesn't work properly Tim Slattery <Slattery_T@bls.gov> - 2012-11-14 08:44 -0500
Re: Continuous vertical marquee doesn't work properly Fokke Nauta <fnautaNO@SPAMsolfon.nl> - 2012-11-14 14:54 +0100
Re: Continuous vertical marquee doesn't work properly Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-14 20:38 +0100
Re: Continuous vertical marquee doesn't work properly "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-11-14 21:43 +0100
Re: Continuous vertical marquee doesn't work properly Tim Streater <timstreater@greenbee.net> - 2012-11-14 14:16 +0000
Re: Continuous vertical marquee doesn't work properly SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-11-14 16:14 +0100
Re: Continuous vertical marquee doesn't work properly SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-11-14 11:24 +0100
Re: Continuous vertical marquee doesn't work properly Fokke Nauta <fnautaNO@SPAMsolfon.nl> - 2012-11-14 13:40 +0100
Re: Continuous vertical marquee doesn't work properly SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-11-14 16:50 +0100
Re: Continuous vertical marquee doesn't work properly Fokke Nauta <fnautaNO@SPAMsolfon.nl> - 2012-11-14 18:47 +0100
Re: Continuous vertical marquee doesn't work properly SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-11-14 20:17 +0100
Re: Continuous vertical marquee doesn't work properly Fokke Nauta <fnautaNO@SPAMsolfon.nl> - 2012-11-15 08:59 +0100
Re: Continuous vertical marquee doesn't work properly SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-11-15 09:41 +0100
Re: Continuous vertical marquee doesn't work properly Fokke Nauta <fnautaNO@SPAMsolfon.nl> - 2012-11-15 13:11 +0100
Re: Continuous vertical marquee doesn't work properly SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-11-15 14:06 +0100
Re: Continuous vertical marquee doesn't work properly Fokke Nauta <fnautaNO@SPAMsolfon.nl> - 2012-11-16 09:01 +0100
csiph-web