Make your own free website on Tripod.com

............... ............... ............... ...............

Home Articles Politics Quotes Records Sports History Did you know? Jokes Science

 

What on Mars (I mean Earth) are java, DHTML or CGI scripts?

Java-scripts were invented by Sun Microsystems in the 1990's. They are used to make special effects when you are designing a site. DHTML scripts are very similar to java scripts. When you search for a site in YAHOO or when you send an e-mail in HOTMAIL, the computer uses a CGI script. You need to write down a java script or DHTML in the HTML (Hyper Text Markup Language) of your web site. For CGI scripts you need to upload a *.pl file and refer to it in your HTML.

IF YOU WANT TO SEE WHAT TERRIFIC EFFECTS A SCRIPT CAN DO, JUST BE BOTHERED TO CLICK ON "TRY IT YOURSELF".

CONTENTS

Please click on one of the following...........
bulletBACKGROUND CHANGE TRY IT YOURSELF!
bulletCLOCK TRY IT YOURSELF!
bulletCONFIRMATION TRY IT YOURSELF!
bulletCURTAIN TRY IT YOURSELF!
bulletDROP DOWN TRY IT YOURSELF!
bulletFRAME ON-FRAME OFF TRY IT YOURSELF!
bulletGOTO LISTBOX TRY IT YOURSELF!
bulletLAST DATE MODIFIED TRY IT YOURSELF!
bulletLINK TIPS TRY IT YOURSELF!
bulletMESSAGE READER TRY IT YOURSELF!
bulletMOUSE FOLLOW TRY IT YOURSELF!
bulletMOUSE-OVER ON STATUS BAR TRY IT YOURSELF!
bulletRANDOM AD SPACE TRY IT YOURSELF!
bulletROLLING CREDITS TRY IT YOURSELF!
bulletSCROLLER 
bulletSCROLLING BANNER TRY IT YOURSELF!
bulletSLIDE MENU 
bulletSTATUS BAR MESSAGE TRY IT YOURSELF
bulletSLIDEOUT TRY IT YOURSELF

BACKGROUND CHANGE

<!-- Background Changer
Just make sure you add your Title before this script.
If you change the last line in will give you the rest
of the information for your page (link color,text etc.)
Play with the colors !-->
 

<script>
// Modified by CoffeeCup Software

function initArray()
{
this.length = initArray.arguments.length
for (var i = 0; i < this.length; i++)
this[i+1] = initArray.arguments[i]
}

var hexChars = "0123456789ABCDEF";

function Dec2Hex (Dec)
{
var a = Dec % 16;
var b = (Dec - a)/16;
hex = "" + hexChars.charAt(b) + hexChars.charAt(a);
return hex;
}

function bgChanger (begin, end, steps)
{
steps = steps -1 ;

redA = begin.charAt(0) + begin.charAt(1);
red_valA = parseInt(redA,'16');
redB = end.charAt(0) + end.charAt(1);
red_valB = parseInt(redB,'16');
red_int = ((red_valB - red_valA) / steps) * -1;
grnA = begin.charAt(2) + begin.charAt(3);
grn_valA = parseInt(grnA,'16');
grnB = end.charAt(2) + end.charAt(3);
grn_valB = parseInt(grnB,'16');
grn_int = ((grn_valB - grn_valA) / steps) * -1;
bluA = begin.charAt(4) + begin.charAt(5);
blu_valA = parseInt(bluA,'16');
bluB = end.charAt(4) + end.charAt(5);
blu_valB = parseInt(bluB,'16');
blu_int = ((blu_valB - blu_valA) / steps) * -1;

step = 2;
red = red_valA;
grn = grn_valA;
blu = blu_valA;

document.bgColor = begin;

while ( steps >= step )
{
red -= red_int;
red_round = Math.round(red);
red_hex = Dec2Hex(red);

grn -= grn_int;
grn_round = Math.round(grn);
grn_hex = Dec2Hex(grn);

blu -= blu_int;
blu_round = Math.round(blu);
blu_hex = Dec2Hex(blu);

document.bgColor = red_hex + grn_hex + blu_hex;

step++;
}
document.bgColor = end;
}

</script>
</head>
<body bgcolor=#000000 text=#FFFFFF link="FF0000" vlink="8888FF" alink="FF00FF">
<script>
<!--
// black to black (pause)
bgChanger("000000","000000",25);
// black to red
bgChanger("000000","FF0000",25);
// red to black
bgChanger("FF0000","000000",25);
// black to purple
bgChanger("000000","AA00EE",25);
// purple to black
bgChanger("AA00EE","000000",25);
// black to blue
bgChanger("000000","0000FF",25);
// blue to black
bgChanger("0000FF","000000",25);
// black to black (pause)
bgChanger("000000","000000",25);
// -->
</script>
</head>
<body>
<BODY BGCOLOR=000000 text="#ffffff" link="#0000ff" vlink="#c00c0">

<CENTER><H2>TEXT & STUFF NOW</CENTER></H2>

CONFIRMATION

<!-- This allows the user confirm entering the page -->
<SCRIPT LANGUAGE="JavaScript"><!--
//modified by Coffeecup.com

function Info()
{
if (!confirm("You are entering a site where ........... Press <OK> to enter. Press <Cancel> if you want to change your mind.......... "))
history.go(-1);return " "
}

document.writeln(Info())<!--End--></script>

CLOCK

<!-- This is a clock that shows the system time -->
<SCRIPT LANGUAGE="JavaScript">

var timerID = null;
var timerRunning = false;

function stopclock ()
{
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}

function showtime ()
{
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes();
var seconds = now.getSeconds()

var timeValue = "" + ((hours >12) ? hours -12 :hours)
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += ((seconds < 10) ? ":0" : ":") + seconds
timeValue += (hours >= 12) ? " P.M." : " A.M."
document.clock.face.value = timeValue;

// you could replace the above with this
// and have a clock on the status bar:
// window.status = timeValue;

timerID = setTimeout("showtime()",1000);
timerRunning = true;
}

function startclock ()
{
// Make sure the clock is stopped
stopclock();
showtime();
}

</SCRIPT>

<BODY onLoad="startclock(); timerONE=window.setTimeout" BGCOLOR="000080" TEXT="ffffff">

<CENTER><form name="clock" onSubmit="0">
<input type="text" name="face" size=13 value=""></CENTER>
 
CURTAIN

<!-- START OF Curtain DHTML -->

<!-- SUMMARY BRIEFS
This DHTML script will give a "curtain" effect displaying
your webpage. You can adjust the color by changing the
HEX code below and the word "PURPLE".

Place this after the <BODY> tag.
-->
 

<style>
<!--
.curtain{
position:absolute;
left:0;
top:0;
layer-background-color:800080;
background-color:800080;
border:0.1px solid PURPLE
}
-->
</style>
 
 
 

<div id="c1" class="curtain"></div><div id="c2" class="curtain"></div>
<script language="JavaScript1.2">
 

var speed=20
var temp=new Array()
var temp2=new Array()
if (document.layers){
for (c=1;c<=2;c++){
temp[c]=eval("document.c"+c+".clip")
temp2[c]=eval("document.c"+c)
temp[c].width=window.innerWidth
temp[c].height=window.innerHeight/2
temp2[c].top=(c-1)*temp[c].height
}
}
else if (document.all){
var curtainbottom=document.body.offsetHeight/2,curtaintop=0
for (c=1;c<=2;c++){
temp[c]=eval("document.all.c"+c+".style")
temp[c].width=document.body.clientWidth
temp[c].height=document.body.offsetHeight/2
temp[c].top=(c-1)*parseInt(temp[c].height)
}
}

function openit(){
window.scrollTo(0,0)
if (document.layers){
temp[1].bottom-=speed
temp[2].top+=speed
if (temp[1].bottom<=0)
clearInterval(stopit)
}
else if (document.all){
curtainbottom-=speed
temp[1].clip="rect(0 auto+"+curtainbottom+" 0)"
curtaintop+=speed
temp[2].clip="rect("+curtaintop+" auto auto)"
if (curtainbottom<=0)
clearInterval(stopit)
}
}
function gogo(){
stopit=setInterval("openit()",100)
}
gogo()

</script>

<!-- END OF Curtain DHTML -->