Type Writer Effect 1.1 (IE)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Type Writer 1.1</title>
<style type="text/css">
.link{font-family:verdana,arial,helvetica; font-size:8pt; color:#003399; font-weight:normal}
.link:hover{font-family:verdana,arial,helvetica; font-size:8pt; color:#0099FF; font-weight:normal}
.prem_hint{font-family:verdana,arial,helvetica; font-size:8pt; color:#000000; font-weight:normal}
.header{font-family:arial,verdana,helvetica; font-size:20pt; color:#FF0000; font-weight:bold}
</style>
<!--BEGIN REQUIRED-->
<script language="javascript">
// Location of this script:
// http://www.qiksearch.com/javascripts/type_writer11.htm
//*********************************************
//* Type Writer effect 1.1 *
//* This script create 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 Pillai";
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('<div id="' + text_type + i + '" style="position:absolute; visibility:hidden; top:' + begin_pos + '; left:' + (left_pos+15*i) + '">');
document.write('<font face="verdana,arial,helvetica" size="2" color="#003399"><b>' + text_type.charAt(i-1) + '</b></font></div>');
}
dotype();
}
document.write('<div id="' + cursor_var + '" style="position:absolute; visibility:hidden; top:' + begin_pos + ';">');
document.write('<font face="verdana,arial,helvetica" size="2" color="#FA5D00"><b>' + cursor_char + '</b></font></div>');
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";
styleSwitch=".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<text_type_len)
{
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>
<!--END REQUIRED-->
</head>
<body bgcolor="#FFFFFF">
<center>
<span class="header">Type Writer Effect 1.1</span>
<br>
<br><br>
<table align="center" width="400"><tr><td>
<font face="verdana,arial,helvetica" size="-1" color="#000000">
This is a modification of the <a href="type_writer.htm" class="link">Type Writer Effect</a> script. The new addition is the cursor while typing.<br><br>
You can change the text by changing the variable <font face="courier">text_type</font>.
The distance of the text from top can be changed by changing the variable <font face="courier">begin_pos</font> (Here it is 55). The distance of the text from the left can be changed by changing the variable <font face="courier">left_pos</font> (Here it is 110). You can also change the speed of typing by changing the variable <font face="courier">time_length</font>.
<br><br>After all the text is typed out the cursor blinks. The blink speed can be changed by changing the value of the variable <font face="courier">cursor_blink_speed</font> (Here it is 300). You can also change the cursor character by changing the variable <font face="courier">cursor_char</font> (Here it is $).
</font>
</td></tr></table>
<br>
<center><a href="mailto:premshree@hotmail.com" class="link">© Premshree Pillai</a></center>
</body>
</html>
Related examples in the same category