codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  need help to customize a dhtml script.  jp_sympa at 15:31 on Monday, August 16, 2004
 

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>







CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Wrap Counter??
•  Login and Redirect -- Help Please
•  Re: Adding values to text field from popup - JavaScript
•  Re: loop through form checkboxes
•  Re: Implementing setTimeout causing problems
•  Re: grouping records
•  Re: after updation of a table open another program .. need help
•  Unseen changes
•  Re: How to execute data using VB in excel


Recent Articles
Simple Thumbnail Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)
Function to Return Alpha Characters Only
The OSI Reference Model - A Clear and Concise Illustration !


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2004