[ DeX-Force @ 29.01.2005. 19:37 ] @
U pitanju je 'scrolling text'. Sve skripte koje sam video su lose, seckaju i ne dopadaju mi se. Nasao sam ovu koja sjajno radi ali samo iz explorera. Iz firefoxa ne radi?

Code:

<table width="320" border="0" align="center">
<tr bgcolor="#63639C"> 
<td bgcolor="#3366CC">&nbsp; 

<script language="JavaScript1.2">

/*
Scrolling Text script- 
Distributed by http://www.hypergurl.com
*/


//Change script's width (in pixels)
var marqueewidth=300
//Change script's height (in pixels, pertains only to NS)
var marqueeheight=20
//Change script's scroll speed (larger is faster)
var speed=6
//Change script's contents
var marqueecontents='<font face="Arial" font color="#FFFFFF"><strong><big>Have
 fun with this script</big></strong></font><background color="#00080">'

if (document.all)
document.write('<marquee scrollAmount='+speed+' style="width:'+marqueewidth+'">'+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('<nobr>'+marqueecontents+'</nobr>')
    document.cmarquee01.document.cmarquee02.document.close()
    thelength=document.cmarquee01.document.cmarquee02.document.width
    scrollit()
}

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

window.onload=regenerate2
</script>
    </td>
        </tr>
      </table>
<ilayer width=&{marqueewidth}; height=&{marqueeheight}; name="cmarquee01">
<layer name="cmarquee02"></layer>
</ilayer>

[ noviKorisnik @ 29.01.2005. 20:41 ] @
Code:
if (document.all) alert ('IE') else alert ('no all')
[ DeX-Force @ 30.01.2005. 11:28 ] @

Nerazumem, jel treba dodati ovo?

Kad dodam ovo onda ne radi uopste ni iz jednog browsera.
[ noviKorisnik @ 30.01.2005. 14:02 ] @
Izgleda da ima grešku - fali tačka-zarez pre else.

I - ne treba da se doda u kod, već da ukaže gde je problem - document.all (pogledaj u svom listingu) je specifičnost Internet Explorera i zato ne treba da čudi što neće da funkcioniše u drugom browseru.
[ DeX-Force @ 30.01.2005. 15:38 ] @
Uspeo sam, radi. Hvala puno.

A cemu uopste sluzi document.all - ja sam predpostavio da to znaci da je cela strana ucitana ili tako nesto, pa sam to izbacio i sada radi. Jesam li u pravu?
[ noviKorisnik @ 30.01.2005. 20:13 ] @
http://www.metalusions.com/backstage/articles/8/