PDA

View Full Version : HTML help


Furious_Angel
02-03-2004, 12:50 AM
yea i;m working on a site and i'm trying to add a new feature... its a moving status bar... my friend gave me the HTML codes for it but i cant seem to get it to work the codes i have are

<script language=JavaScript><script language="JavaScript">
<!--

msg = "Welcome To The Matrix";

timeID = 10;
stcnt = 16;
wmsg = new Array(33);
wmsg[0]=msg;
blnk = " ";
for (i=1; i<32; i++)
{
b = blnk.substring(0,i);
wmsg[i]="";
for (j=0; j<msg.length; j++) wmsg[i]=wmsg[i]+msg.charAt(j)+b;
}

function wiper()
{
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = str;
clearTimeout(timeID);
timeID = setTimeout("wiper()",100);
}

wiper()
// -->
</script>

first off do i need to put this in the head or bodyy? and if theres anything wrong with the code does anyone know what it is?

Furious_Angel
02-03-2004, 05:39 PM
does anyone on this site even know HTML other than hashish???

Smubeht
02-03-2004, 05:55 PM
should go in head, with a body tag onload = "whatever the funcion is"

Rabi en Rose
02-03-2004, 08:22 PM
The script you have doesn't work because you've got 2 <script> tags. Get rid of one. You don't need the body onload tag for this script, since it has wiper() and runs directly.

BTW: I don't recommend using them because a lot of people find that annoying.

Smubeht
02-03-2004, 09:45 PM
Ah, yeah i saw that too, I was thinking about it, as i was posting, but forgot to mention..

Smubeht
02-03-2004, 09:46 PM
i think you still need

<body onload = "wiper()">

Furious_Angel
02-03-2004, 10:32 PM
thanks i will try both right now...

Furious_Angel
02-03-2004, 10:39 PM
i got the code to work i didn't need the onload tag but he gave me the wrong code! the status bar just changes from Message to M e s s a g e n i wanted it to move... :mad:

Smubeht
02-03-2004, 10:53 PM
ah yeah your right u didnt need the onload i didnt see in bottom of code

wiper()

i thought rabi was talkin bout the function wiper()..and im like u have to run it from somewhere..but it was later in code..my mistake..

Furious_Angel
02-03-2004, 10:56 PM
yea i use frontpage but i dont know hwo to do things liek that in frontpage so i go to a site that has a bunch of cool DHTML and cool effects like that... yes i finally got frontpage hashish :D:D:D:D:D