DHTML TYPE WRITER EFFECT
THIS ITELETYPEWRITER THAT TYES OUT A Message You Want.
You can change the text by changing the variable text_type. The distance of the text from top can be changed by changing the variable begin_pos (Here it is 55). The distance of the text from the left can be changed by changing the variable left_pos ( Here it is 110). You can also change the spesed of type time_length.
After all the text is typed out the cursor blinks. The blink speed can be changed by changing the value of the variable cursor_blink_speed (Here it is 300). You can also change the cursor character by changing the variable cursor_char (Here it is $) .
Place The Following Code in The Head of Your Web Page.
Select All Code
// Location of this Script:
// http://www.qiksearch.com/javascripts/type_writer11.htm
// **************************************************
// * Type Writer Effect 1.1 *
// * this script crete a type writer effect *
// * (c) premshree pillai, *
// * http://www.qiksearch.com *
// * e-mail: premshree@hotmail.com *
// * Use the script freely as long as this *
// * Message is intact *
// **************************************************
WINDOW.ONERROR = NULL;
VAR BNAME = Navigator.Appname;
VAR BVER = PARSEINT (Navigator.AppVersion);
VAR NS4 = (BNAME == "Netscape" && BVER> = 4);
Var IE4 = (BName == "Microsoft Internet Explorer"
&& BVER> = 4);
VAR NS3 = (BNAME == "Netscape" && BVER <4);
VAR IE3 = (BName == "Microsoft Internet Explorer" && BVER <4);
VAR TIME_LENGTH = 100; // Scroll Speed
Var begin_pos = 55;
Var left_pos = 110;
VAR i = 1;
VAR J = 0;
VAR CURSOR_BLINK_SPEED = 300;
VAR text_type = "Type Writer Effect by Premshree Pillage";
Var text_type_len = text_type.length;
VAR CURSOR_VAR = "CURSOR";
VAR CURSOR_CHAR = "$"
Function Type ()
{
FOR (var i = 1; i <= text_type_len; i )
{
Document.write ('
Document.write (' ' text_type.charat (i-1) ' b> font > div> ');
}
Dotype ();
}
Document.write ('
Function Dotype ()
{
Settimeout ("Show ('" text_type i ")", time_length);
}
IF (NS4 || IE4) {
IF (Navigator.Appname == "Netscape") {
LayersTyleref = "Layer.";
LayerRef = "Document.layers";
STYLESWITCH = ""
} else {
LayerstyleRef = "layer.style.";
LayerRef = "this.document.all"; style ";
}
}
// show
Function show (layername) {
IF (NS4 || IE4) {
Eval (LayerRef '[" layername '"] '
STYLESWITCH '. Visibility = "visible");
Eval (LayerRef '["' CURSOR_VAR '"]'
STYLESWITCH '. Visibility = "visible");
Eval (LayerRef '["' CURSOR_VAR '"]'
STYLESWITCH '. left = "' (left_pos 10 15 * i) '");
IF (i> = text_type_len)
{
BLINK ();
}
IF (i { i ; Dotype (); } } } Function Blink () { IF (j% 2 == 0) { Eval (LayerRef '["' CURSOR_VAR '"]' STYLESWITCH '. Visibility = "visible"); } Else { Eval (LayerRef '["' CURSOR_VAR '"]' STYLESWITCH '. Visibility = "hidden"'); } IF (j <2) { J } Else { J- } SetTimeout ("BLINK ()", CURSOR_BLINK_SPEED); } TYPE (); script>