Article View: chile.comp.programacion
Article #2514Re: Scroll en Javascript compatible?
From: gato2005_cl
Date: Sat, 03 Dec 2005 18:36
Date: Sat, 03 Dec 2005 18:36
55 lines
2839 bytes
2839 bytes
Usa getElementById.
Pintamono escribi๏ฟฝ:
> 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:
<dmq470$up2$1@news.nivel5.cl>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.moat.net!newsfeed.mesh.ad.jp!newsfeed.media.kyoto-u.ac.jp!news-xfer.nntp.sonic.net!news.kjsl.com!news.nivel5.cl!not-for-mailReferences:
<1133537222.740415.55990@o13g2000cwo.googlegroups.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,11068600096d7831 X-Google-Attributes: gid1593cb,public X-Google-Language: SPANISH,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.moat.net!newsfeed.mesh.ad.jp!newsfeed.media.kyoto-u.ac.jp!news-xfer.nntp.sonic.net!news.kjsl.com!news.nivel5.cl!not-for-mail From: gato2005_cl <gato2005_clSINESTO@spymac.com> Newsgroups: chile.comp.programacion Subject: Re: Scroll en Javascript compatible? Date: Sat, 03 Dec 2005 15:36:02 -0300 Organization: Varios Lines: 55 Message-ID: <dmq470$up2$1@news.nivel5.cl> References: <1133537222.740415.55990@o13g2000cwo.googlegroups.com> NNTP-Posting-Host: pc-178-51-86-200.cm.vtr.net Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.nivel5.cl 1133548576 31522 200.86.51.178 (2 Dec 2005 18:36:16 GMT) X-Complaints-To: news@news.nivel5.cl NNTP-Posting-Date: Fri, 2 Dec 2005 18:36:16 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Win98; es-ES; rv:1.7.10) Gecko/20050716 Thunderbird/1.0.7 Mnenhy/0.7.2.0 X-Accept-Language: es-es, es In-Reply-To: <1133537222.740415.55990@o13g2000cwo.googlegroups.com>