|
Hello, i am using a script that i got from dynamicdrive.com.
It's a kind of text slideshow.
My problem is that it doesn't work well with mozilla or netscape.
This my site :
www.zenithimmo.com
I don't understand anything in DHTML for the moment, could someone telle how to change the script to be accessible with Mozila or another way to open on a new web page at the end of the slideshow.
Thanks to all, sorry for my english.
this is the script :
//in Head
<style type="text/css">
.glidetext{
position: absolute;
left: -1000px;
}
</style>
<script type="text/javascript">
var pausebetweenmsg=2000//temps en milisecondes entre les passages des différents messages
var glidespeed=5000 //vitesse d'entrée du message
var curobjindex=0
function actualstyle(el, cssproperty){
if (el.currentStyle)
return el.currentStyle[cssproperty]
else if (window.getComputedStyle){
var elstyle=window.getComputedStyle(el, "")
return elstyle.getPropertyValue(cssproperty)
}
}
function collectElementbyClass(){
var classname="glidetext"
glidearray=new Array()
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags.className==classname)
glidearray[inc++]=alltags
}
if (glidearray.length>0)
onebyoneglide()
}
function onebyoneglide(){
if (curobjindex<glidearray.length)
glidetimer=setInterval("glideroutine()",50)
}
function glideroutine(){
if (parseInt(actualstyle(glidearray[curobjindex], "left"))<0)
glidearray[curobjindex].style.left=parseInt(actualstyle(glidearray[curobjindex], "left"))+50
else{
glidearray[curobjindex].style.left=0
curobjindex++
clearInterval(glidetimer)
setTimeout("onebyoneglide()", pausebetweenmsg)
}
}
if (window.addEventListener)
window.addEventListener("load", collectElementbyClass, false)
else if (window.attachEvent)
window.attachEvent("onload", collectElementbyClass)
else if (document.getElementById)
window.onload=collectElementbyClass
</script>
//In Body
<div class='glidetext'><br><br><br>Bienvenue à Zenith Immobilier.</div>
<div class='glidetext'><br><br><br>Votre Agence Immobilière dans le Gard.</div>
<div class='glidetext'><br><br><br>Nous vous souhaitons <br>une très agréable visite.</div>
|
|
|
|
|
|
|
|