RE: Text Array location

by Klaas De Waele <klaas(at)gracegraphics.be>

 Date:  Fri, 6 Jul 2001 09:11:28 +0200
 To:  "'Christopher'" <christopherm(at)chartertn.net>,
"'HWG techniques'" <hwg-techniques(at)mail.hwg.org>
  todo: View Thread, Original
Would be happy to take a look at it, just the code you sent is not enough to
recreate the page.

Thanks.

By the way... if you have problems centering, try using the <.center> and
<./center> tags.


- Kayjey -


-----Oorspronkelijk bericht-----
Van: owner-hwg-techniques(at)hwg.org
[mailto:owner-hwg-techniques(at)hwg.org]Namens Christopher
Verzonden: donderdag 5 juli 2001 16:57
Aan: 'HWG techniques'
Onderwerp: Text Array location


Hello all,

I'm looking at a script and it is positioned correct (centered) in NN
but aligned left in IE.  I've tried a few things, including starring at
it and shaking my head, but to no avail.  Any help much appreciated.

<.script>


        text=new Array('the','text','is','here')

        var numText=4

        color=new
Array('#000000','#2F2F2F','#4F4F4F','#7F7F7F','#408080')

        var numColors=5

        var endSize=70

        var Zspeed=30

        var Cspeed=200

        var font='Arial Black'

        var hide=false

var size=10

var gonum=0

var ie, n;

if (document.all) {

                n=0

                ie=1

                zoomText='document.all.zoom.innerText=text[num]'

                zoomSize='document.all.zoom.style.fontSize=size'

                closeIt=""

                fadeColor="document.all.zoom.style.color=color[num]"

        }

if (document.layers) {

                n=1;ie=0

                zoomText=""

                zoomSize="document.zoom.document.write('<p
align=\"center\" style=\"font-family:'+font+'; font-size:'+size+'px;
color:'+color[0]+'\">'+text[num]+'</p>')"

                closeIt="document.zoom.document.close()"

                fadeColor="document.zoom.document.write('<p
align=\"center\" style=\"font-family:'+font+'; font-size:'+endSize+'px;
color:'+color[num]+'\">'+text[numText-1]+'</p>')"

        }


function zoom(num,fn){

        if (size<endSize){

                eval(zoomText)

                eval(zoomSize)

                eval(closeIt)

                size+=5;

                setTimeout("zoom("+num+",'"+fn+"')",Zspeed)

        }else{

                eval(fn);

        }

}


function fadeIt(num){

        if (num<numColors){

                eval(fadeColor)

                eval(closeIt)

                num+=1;

                setTimeout("fadeIt("+num+")",Cspeed)

        }else{

                hideIt()

        }

}


function hideIt(){

        if(hide){

                if(ie)document.all.zoom.style.visibility="hidden"

                if(n)document.layers.zoom.visibility="hidden"

        }

}


function init(){

        if(ie){

                document.all.zoom.style.color=color[0]

                document.all.zoom.style.fontFamily=font

        }

        if(ie || n) go(0)

}

function go(num){

        gonum+=1

        size=10

        if(num<numText){

                zoom(num,'go('+gonum+')')

        }else{

                fadeIt(0)

        }

}

<./script>

--
_____________________________________________

Christopher Menke
ICQ #  1600546
christopherm(at)chartertn.net
_____________________________________________


 

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.