I, a newbiez, combined 3 cool scripts into one, and it almost works.
[list=1][*]
Displaying a random message from an array of message.
Continuously refreshing message after a short pause.
Each message when appears on the screen like being typed.
Well! They all work except that just the first message was typed, and all others appear instantly.
You can look [URL=http://25er.com/]http://25er.com/
Please someone look at it to see what wrong, I enclose the code bellow. Note that the messages are in Vietnamese, but that doesn’t interfere with your help. Thanks in advance.
[code]
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<meta http-equiv=”description” content=”Sĩ Quan Hải Quân khoá 25 – Cơ quan ngôn luận chính thức của SQHQ-25″>
<meta http-equiv=”keywords” content=”Sĩ Quan Hải Quân khoá 25, SQHQ-25, sqhq25, 25er, 25ers”>
<meta http-equiv=”Refresh” CONTENT=”600;URL=http://www.25er.com/forum/index.php”>
<meta name=”GENERATOR” content=”Microsoft FrontPage 5.0″>
<title>Sĩ Quan Hải Quân khoá 25</title>
</head>
<body bgcolor=”#FFFFFF” text=”#1C5A00″ link=”#800000″ vlink=”#1C5A00″ alink=”#FFFFFF”>
<p align=”center”> </p>
<p align=”center”> </p>
<p align=”center”> </p>
<p align=”center”> </p>
<div align=”center”><center>
<table border=”0″ width=”428″ cellspacing=”0″ bordercolorlight=”#FFFFFF” bordercolordark=”#FFFFFF” bgcolor=”#FFFFFF” cellpadding=”0″ style=”border-collapse: collapse” bordercolor=”#111111″ >
<tr>
<td width=”100%” align=”center” height=”1″>
<img src=”http://www.25er.com/images/logo250.jpg”
alt=”Sĩ Quan Hải Quân khoá 25″ border=”0″ align=”left” width=”100″ height=”209″>
</td>
<td width=”50%” align=”center” height=”1″></td>
<td width=”50%” align=”left” height=”1″>
<table border=”0″ cellspacing=”0″ style=”border-collapse: collapse” bordercolor=”#111111″ width=”100%” cellpadding=”0″ id=”AutoNumber1″ height=”30″>
<tr>
<td width=”100%” height=”24″ colspan=”2″>
<embed height=0 width=0 console=”clip1″ hidden=”true” autostart=”true” loop=”true” controls=”all” type=”audio/x-pn-realaudio-plugin” src=”http://68.5.151.251:4027/vobivietnam/khoa/k26/luuniemk26/music/realaudio/hqhk.rm”></td>
<td width=”100%” height=”1″>
</td>
</tr>
<tr>
<td width=”100%” height=”47″ colspan=”2″>
</td>
<td width=”100%” height=”19″>
</td>
</tr>
<tr>
<td width=”100%” height=”112″ colspan=”2″>
<div id=”quote” style=”font-family:Arial; font-size=10pt; color=#0000aa; style=visibility:hidden; width:426; height:97″></div>
</td>
</tr>
<tr>
<td width=”82%” height=”4″>
<img src=”http://www.25er.com/images/anchor1sm.jpg” align=”right” border=”0″ alt=”Bấm đây để trình diện hạm kiều.”>
</tr>
<td width=”18%” height=”4″>
</tr>
</table>
</td>
</tr>
</table>
</center></div>
<script LANGUAGE=”JavaScript”>
<!–
// Code by Mark Sottek. Ask before using please. [email][email protected][/email]
/*
Typing Text Script-
Last updated: 99/06/17
© Dynamic Drive ([url]www.dynamicdrive.com[/url])
For full source code, installation instructions,
100’s more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/
quotes = new Array(5);
authors = new Array(5);
quotes[0] = “Đệ trình cùng các quan 25, đây là một ví dụ của trang web SQHQ25.com. Đàn em sẽ từ tốn bẻ góc phát triển thêm cả về nội dung và hình thức. Nếu các quan đồng ý cho đàn em thoải mái, chúng ta sẽ có một trang web (cùng với một diễn đàn) như là một phương tiện liên lạc và thông tin.”;
authors[0] = ” — Th/U Chen”;
quotes[1] = “Hiện bây giờ thì chưa hoàn hảo, nhưng trong một thời gian vài tuần chúng ta sẽ thấy sự tiến triển. Ít nhất là về design.”;
authors[1] = “”;
quotes[2] = “Design của trang nhà lẽ dĩ nhiên không phải đẹp nhất và chỉ TẠM BỢ trong thời gian này. Nếu quan có design nào khác hơn, xin liên lạc với Th/U Chến để đưa lên cho bạn bè ngắm.”;
authors[2] = “”;
quotes[3] = “Chúng ta đã thấy design của Th/U Kè, và hình như Th/U PhúcCC cũng sẽ ra lò một design như Star War. Tất cả sẽ được đem lên và tất cả các quan 25 sẽ vote cái nào đẹp và ý nghĩa nhất và chúng ta sẽ dùng cái đó làm trang nhà của SQHQ25.com.”;
authors[3] = “”;
quotes[4] = “Hy vọng sẽ còn nhiều design khác ngoài những designs của Kè, PhúcCC, và Chến cho chúng ta lực chọn. Thí dụ như từ Phi Văn Nghệ, Thiệp, Con Ma vân vân …”;
authors[4] = “”;
var it = 0
function initialize(){
var div = document.getElementById(‘quote’);
mytext = div.innerHTML
var myheight = div.offsetHeight
div.innerHTML = ”
typeit()
}
function typeit(){
var div = document.getElementById(‘quote’);
div.insertAdjacentText(“beforeEnd”,mytext.charAt(it))
if (it < mytext.length-1){
it++
setTimeout(“typeit()”,10)
}
else {
return
}
}
function randomQuote() {
var str, div = document.getElementById(‘quote’);
index = Math.floor(Math.random() * quotes.length);
str= quotes[index];
str+= authors[index];
div.innerHTML = str;
if (document.all) document.body.onload = initialize
}
randomQuote();
window.setInterval(“randomQuote()”,5000);
//done –>
</script>
</body>
</html>
.