Okay, here’s my problem, I want to have a page load on opening, execute the “typewriter script” and, only when the script has ended, load another page…
What I’ve done doesn’t work… The type writer script works perfectly alone, but it doesn’t get to start before the page is redirected (whatever I put as “waiting time”)…
I would like to find a way to make the page execute the script and redirect only when it is done…
Here it is anyway:
[code=php]<html>
<head>
<title>MAIN FRAME LOADING</title>
<META HTTP-EQUIV=”Refresh”
CONTENT=”3;URL=http://www…/filelist.html”>
<base target=”contents”>
<SCRIPT LANGUAGE=”JavaScript”>
<!–
function redirect () {
setTimeout(“go_now()”,3000);
}
function go_now () {
window.location.href = “http://www…/filelist.html”;
}
//–>
</SCRIPT>
</head>
<body topmargin=”0″ leftmargin=”0″
bgcolor=”#000000″>
<DIV ID=ejs_box2_box STYLE=”background:#000000;color:#ffffff;
font-familly:fixed width;font-size:14;
width:500;height:145;padding:5″></DIV>
<SCRIPT LANGUAGE=JavaScript>
<!–
/*
letter by letter box
*/
ejs_box2_message = new Array;
ejs_box2_message[0] = ‘<FONT FACE=”Courier New” size=”2″>
WELCOME TO FILE VIEWER 3.2<br>
LOADING FILE LIST…<br>
RENDERING FILE LIST</FONT>’;
ejs_box2_actual = 0;
ejs_box2_html_flag = 0;
function ejs_box2_go()
{
if(document.getElementById)
{
ejs_box2_char = 1;
ejs_box2_affich(ejs_box2_actual)
ejs_box2_actual++;
if(ejs_box2_actual >= ejs_box2_message.length)
ejs_box2_actual = 0;
}
}
function ejs_box2_affich(lactual)
{
var pix = ejs_box2_message[lactual].charAt(ejs_box2_char);
if(pix == “<“)
ejs_box2_html_flag = 1;
if(pix == “>”)
ejs_box2_html_flag = 0;
var texte = ejs_box2_message[lactual].substring(0,ejs_box2_char);
document.getElementById(“ejs_box2_box”).innerHTML = texte;
if(ejs_box2_char < ejs_box2_message[lactual].length)
{
ejs_box2_char++;
if(ejs_box2_html_flag == 1)
ejs_box2_affich(lactual);
else
setTimeout(“ejs_box2_affich(“+lactual+”)”,100)
}}
window.onload = ejs_box2_go;
//–>
</SCRIPT>
</body>
</html>
Can you help me??