View Full Version : help me in javascript


garfield
12-05-2002, 02:54 AM
can i ask anyone here who knows javascript to kindly tell me what the function below means? i got this at dynamic drive but they dont offer explanation on what each statement does. can i ask how did the webmaster here did the moving menu here? thanks.

<script language="JavaScript1.2">
var it=0
function initialize()
{
var mytext=typing.innerText
var myheight=typing.offsetHeight
typing.innerText=''
document.all.typing.style.height=myheight
document.all.typing.style.visibility="visible"
typeit()
}

function typeit()
{
typing.insertAdjacentText("beforeEnd",mytext.charAt(it))
if (it<mytext.length-1)
{
it++
setTimeout("typeit()",100)
}
else
return
}

if (document.all)
document.body.onload=initialize
</script>

<small><span id="typing" style="visibility:hidden" align="left">welcome!!</span></small>

clare
12-06-2002, 10:02 AM
All I get is
Welcome
writen on the screen

This might be so welcome individuals after loging on....

Can you give us any more info - like where you found it?

Clare

garfield
12-07-2002, 06:19 PM
well actually this is a text that appears as being typed on the screen and is placed in the <body> tag but then i dont know some of the functions like innerHTML in there. thats all thanks