|
|
|
This is first of three different 'ripple text' effects coded in Javascript.
Sample 1 = Random change the display of characters in a text string
Sample 2 = Sequential change display of characters in a text string - colour and case
Sample 3 = Change display of characters in a text string - progressive colour change
This is sample 2: 'Ripple Text - colour and case change'
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function open () {return true;}
//-->
</SCRIPT>
<title>Ripple Text Examples by Mark Boyle email mboil@hotmail.com</title>
</head>
<BODY bgcolor=green text="white" bgcolor="green" link="yellow" vlink="yellow"
alink="red">
<font color="yellow">
<SCRIPT LANGUAGE="JavaScript">
var speed = 5; // enter duration time here
var fulltext;
var whichchar=0;
if(navigator.appName == "Netscape")
document.write('<layer id="wds"></layer><br>');
if (navigator.appVersion.indexOf("MSIE") != -1)
document.write('<span id="wds"></span><br>');
function livetext()
{
fulltext="Ripple Text with case and colour change effect."
whichchar = whichchar + 1
if (whichchar==fulltext.length+1)
whichchar=0;
// var whichchar=Math.round((Math.random()*fulltext.length))
switch(whichchar){
case 0:
fulltext = '<b><font face="courier" color="orange">' + fulltext.substring
(0,1).toUpperCase() + '</font><font face="courier" color="orange">' + fulltext.substring
(1,fulltext.length).toLowerCase() + '</font></B>';
break;
case fulltext.length:
fulltext = '<b><font face="courier" color="yellow">' + fulltext.substring
(0,fulltext.length).toUpperCase() + '</font></B>';
break;
default:
fulltext = '<b><font face="courier"><font color="orange">' +
fulltext.substring(0,whichchar).toLowerCase() + '</font><font color="tomato">' +
fulltext.substring(whichchar,whichchar+1).toUpperCase() + '</font><font
color="orange">' +
fulltext.substring(whichchar+1,fulltext.length).toLowerCase() + '</font></font></B>';
break;
}
if(navigator.appName == "Netscape") {
size = "<font point-size='25pt'>";
document.wds.document.write(size+'<center>' + fulltext + '</center></font>');
document.wds.document.close();
}
if (navigator.appVersion.indexOf("MSIE") != -1){
wds.innerHTML = '<p><center>' + fulltext + '</center>';
wds.style.fontSize='25px'
}
setTimeout("livetext()",speed);
}
livetext()
</script>
</font>
</BODY>
</html>
|
|
| Conditional Check - a script that allows a user to submit a form only if the user check a checkbox. Categories : HTML, Java Script, Form Processing, Beginner Guides | | | Enchancing dd/mm/yyyy forms with unobtrusive javascript Categories : Java Script, HTML, User Interface, Date Time | | | Hilight Form Element onFocus Categories : Java Script, Form Processing, CSS | | | write an event to the eventlog via JScript Categories : Java Script, Windows 2000 | | | Pull Down Surfing - Surf on Change Categories : Java Script, MySQL, HTML and PHP, PHP, Databases | | | Upload any fixed type of files, control file type through javascript and encrypt filename using php so file not get overwrite Categories : PHP, Java Script, Functions, PHP References, Form Processing | | | How to get the Focus (Cursor) into a Form-Element. Categories : HTML, Java Script | | | Ajax - Perform a simple server side request and update the current HTML page. Categories : AJAX, Java Script, Beginner Guides | | | JavaScript IP validation; IP validation script; Categories : Java Script, Algorithms | | | How to check if JavaScript is enabled on a remote browser with PHP Categories : PHP, Java Script | | | PHP and javascript mouseover, mouseout, and mousedown events Categories : PHP, Java Script, Form Processing, Beginner Guides | | | Validator 98 - a PHP-script to generate form-validation-code in JavaScript. Categories : Complete Programs, Java Script, PHP, HTML and PHP | | | Dynamic Loading of XML array data into ComboBox and Display XML data using PHP + DOM + Javascript. Categories : PHP, Java Script, DOM XML, XML, Arrays | | | Adding a Filter to a Text Element Categories : Java Script, Data Validation, Form Processing | | | Classic guest book made with PHP and Flash Categories : PHP, Flash, Java Script | |
|
|