|
< d e v h e a d : s c r i p t l i b r a r y >
Script: 0113
Type: JavaScript
------------------------------------------------
To install this script, follow these simple steps:
1. Cut and paste this script into the HEAD of your document:
<SCRIPT LANGUAGE="JavaScript">
var str = prompt("What is your name?:", "")
<!-- Beginning of JavaScript Applet -------------------
function scrollmsg(seed)
{
var m1 = ("Thank you, "+ str+", for visiting Pachelbel's
homepage...");
var m2 = " Feel free to e-mail me";
var m3 = " if you have anything to contribute.";
var m4 = " Also..don't forget to sign my guestbook";
var msg=m1+m2+m3+m4;
var out = "";
var c = 0;
if (seed > 100) {
seed--;
var cmd="scrollmsg(" + seed + ")";
timerTwo=window.setTimeout(cmd,110);
}
else if (seed <= 100 && seed > 0) {
for (c=0 ; c < seed ; c++) {
out+=" ";
}
out+=msg;
seed--;
var cmd="scrollmsg(" + seed + ")";
document.display.box.value=out;
timerTwo=window.setTimeout(cmd,110);
}
else if (seed <= 0) {
if (-seed < msg.length) {
out+=msg.substring(-seed,msg.length);
seed--;
var cmd="scrollmsg(" + seed + ")";
document.display.box.value=out;
timerTwo=window.setTimeout(cmd,110);
}
else {
document.display.box.value=" ";
timerTwo=window.setTimeout("scrollmsg(15)",110);
}
}
}
// -- End of JavaScript code -------------- -->
</SCRIPT>
2. Cut and paste this event handler within the BODY tag:
onLoad="timerONE=window.setTimeout('scrollmsg(15)',500)"
3. Cut and paste this into the BODY of your document:
<FORM NAME="display" onSubmit="0">
<center><INPUT TYPE="text" NAME="box" VALUE="" SIZE="50"
BORDER+5 > </center>
</FORM>
------------------------------------------------
ZDNet (c) 1999. DevHead and ScriptLibrary provides
these scripts as a free service to our users. The
scripts have been provided by the author for use
within the resource and are "freely distributable."
Scripts remain the property of the author, unless
otherwise indicated.
|
|