🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #2511

Scroll en Javascript compatible?

#2511
From: Pintamono
Date: Fri, 02 Dec 2005 15:27
51 lines
2571 bytes
Este codigo hace una marquesina desplasandose por pantalla, la cosa es
que no funciona en firefox...
por que???
bueno, antes de colocar este codigo probe colocando un <marquee> y
funcionaba sin problemas en IE y Firefox hasta que le colocaba la
propiedad "width" en ese momento dejaba de funcionar en firefox....
Como lo hago para que este codigo sea compatible con
firefox+IE+opera+"otro navegador"???

<script language="JavaScript1.2">

var marqueewidth=350
var marqueeheight=10
var speed=3
var marqueecontents='<font class="texto" size="1">Mensaje del
scroll.</font>'

if (document.all)
document.write('<marquee direction="left" scrollAmount='+speed+'
style="width:'+marqueewidth+';height:'+marqueeheight+'">'+marqueecontents+'</marquee>')

function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
setTimeout("window.onresize=regenerate",450)
intializemarquee()
}
}

function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.write(marqueecontents)
document.cmarquee01.document.cmarquee02.document.close()
thelength=document.cmarquee01.document.cmarquee02.document.height
scrollit()
}

function scrollit(){
if (document.cmarquee01.document.cmarquee02.top>=thelength*(-1)){
document.cmarquee01.document.cmarquee02.top-=speed
setTimeout("scrollit()",100)
}
else{
document.cmarquee01.document.cmarquee02.top=marqueeheight
scrollit()
}
}

window.onload=regenerate2
</script>
Technical Details
Message-ID: <1133537222.740415.55990@o13g2000cwo.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!o13g2000cwo.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,11068600096d7831,start
X-Google-Attributes: gid1593cb,public
X-Google-Language: SPANISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!o13g2000cwo.googlegroups.com!not-for-mail
From: "Pintamono" <pintamono79@yahoo.es>
Newsgroups: chile.comp.programacion
Subject: Scroll en Javascript compatible?
Date: 2 Dec 2005 07:27:02 -0800
Organization: http://groups.google.com
Lines: 52
Message-ID: <1133537222.740415.55990@o13g2000cwo.googlegroups.com>
NNTP-Posting-Host: 201.246.144.86
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1133537228 912 127.0.0.1 (2 Dec 2005 15:27:08 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 2 Dec 2005 15:27:08 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-AR; rv:1.7.10) Gecko/20050717 Firefox/1.0.6,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: o13g2000cwo.googlegroups.com; posting-host=201.246.144.86;
   posting-account=skJ50Q0AAACOrmQ9kj5c1tjv36P849np