Δ Wednesday, May 27th, 2011
bar1
   

Δ Fading Menus

How to create functional fading menus

Demo:
demo


HTML/Javascript

bar1
<!--this script got from http://eddiejackson.net -->

<!-- START OF Drop Down DHTML -->

<!-- SUMMARY BRIEFS
This DHTML script will create a drop down link box out of
an ordinary link. VERY COOL!!!!

The top portion of this script goes above the <BODY> tag.
The second portion goes where you want the drop down link
box to be.
-->




<style>
<!--
#wrapper{
position:relative;
height:30px
}

#wrapper2{
position:absolute
}

#coffeemenu03{
filter:revealTrans(Duration=1.5,Transition=12)
visibility:hide
}


-->
</style></HEAD>

<BODY>

<ilayer id="coffeemenu01" height=35px>
<layer id="coffeemenu02" visibility=show>
<span id="wrapper">
<span id="wrapper2" onClick="dropit2();event.cancelBubble=true;return false">
<font face="Verdana"><b><a href="notthisbrowser.html">Click Here To Navigate</a></b></font>
</span>
</span>
</layer>
</ilayer>

<script language="JavaScript1.2">


var enableeffect=true

var selection=new Array()
selection[0]='<font face="ARIAL BLACK"><a href="http://eddiejackson.net">Link 0</a><br>'
selection[1]='<a href="http://eddiejackson.net">Link 1</a><br>'
selection[2]='<a href="http://eddiejackson.net">Link 2</a><br>'
selection[3]='<a href="http://eddiejackson.net">Link 3</a><br>'
selection[4]='<a href="http://eddiejackson.net">Link 4</a><br></font>'

if (document.layers)
document.coffeemenu01.document.coffeemenu02.visibility='show'

function dropit2(){
if (document.all){
coffeemenu03.style.left=document.body.scrollLeft+event.clientX-event.offsetX
coffeemenu03.style.top=document.body.scrollTop+event.clientY-event.offsetY+18
if (coffeemenu03.style.visibility=="hidden"){
if (enableeffect)
coffeemenu03.filters.revealTrans.apply()
coffeemenu03.style.visibility="visible"
if (enableeffect)
coffeemenu03.filters.revealTrans.play()
}
else{
hidemenu()
}
}
}

function dropit(e){
if (document.coffeemenu03.visibility=="hide")
document.coffeemenu03.visibility="show"
else
document.coffeemenu03.visibility="hide"
document.coffeemenu03.left=e.pageX-e.layerX
document.coffeemenu03.top=e.pageY-e.layerY+19
return false
}

function hidemenu(){
if (enableeffect)
coffeemenu03.filters.revealTrans.stop()
coffeemenu03.style.visibility="hidden"
}

function hidemenu2(){
document.coffeemenu03.visibility="hide"
}

if (document.layers){
document.coffeemenu01.document.coffeemenu02.captureEvents(Event.CLICK)
document.coffeemenu01.document.coffeemenu02.onclick=dropit
}
else if (document.all)
document.body.onclick=hidemenu

</script>

<div id="coffeemenu03" style="position:absolute;left:0;top:0;layer-background-color:#C0C0C0;background-color:#C0C0C0;width:200;visibility:hidden;border:2px solid black;padding:0px">
<script language="JavaScript1.2">
if (document.all)
coffeemenu03.style.padding='4px'
for (i=0;i<selection.length;i++)
document.write(selection[i])
</script>
</div>

<script language="JavaScript1.2">
if (document.layers){
document.coffeemenu03.captureEvents(Event.CLICK)
document.coffeemenu03.onclick=hidemenu2
}
</script>

<!-- END OF Drop Down DHTML -->
bar1

 
[email me]


bar1

   





Δ Tuesday, May 26th, 2011
bar1
   

Δ Drop Down Menu

How to create a simple drop down menu

Demo:
demo



HTML/Javascript

bar1
<title>Drop down menu</title>
<script language="JavaScript">

function CC_go(form) {var myindex=form.dest.selectedIndex
window.open(form.dest.options[myindex].value, target="_parent", "toolbar=yes,scrollbars=yes,location=yes"); }

</script>

<form name="CC_LinkForm">
<select name="dest" SIZE=1>
<option selected value="">Places to go
<option value="http://google.com/">Search Google
<option value="http://bing.com/">Search Bing
<option value="http://webcrawler.com">Search Webcrawler
</select>
<P>
<input type="button" value="Open Search Page" onClick="CC_go(this.form)">
</form>

<!-- End Of Drop Down Links Script -->
<br />
<font face="Tahoma"><a target="_blank" href="http://eddiejackson.net/"><span style="font-size: 8pt; text-decoration: none">eddiejackson.net</span></a></font>
bar1

 

[email me]

bar1

   


   





Δ Monday, May 25th, 2011
bar1
   

Δ Message Cycling

How to create a cycling message at your web site

Demo:
demo



HTML/Javascript

bar1
<html>
<body>

<div id="splashcontainer" style="position:absolute;width:350"></div>

<layer id="splashcontainerns" width=450></layer>


<script>
//configure delay in miliseconds between each message (default: 2 seconds)
var intervals=2000
//configure destination URL
var targetdestination="http://www.google.com/"

//configure messages to be displayed
var splashmessage=new Array()
var openingtags='<font face="Arial" size="4">'
splashmessage[0]="Welcome!"
splashmessage[1]="This is where part 1 of 5 goes"
splashmessage[2]="This is where part 2 of 5 goes"
splashmessage[3]="This is where part 3 of 5 goes"
splashmessage[4]="This is where part 4 of 5 goes"
splashmessage[5]="Please stand by..."
var closingtags='</font>'

//Do not edit below this line


var i=0

function displaysplash_ie(){
if (i<splashmessage.length){
sc_ie.style.visibility="hidden"
sc_ie.innerHTML='<b><center>'+openingtags+splashmessage[i]+closingtags+'</center></b>'
sc_ie.style.top=document.body.scrollTop+document.body.clientHeight/2-sc_ie.offsetHeight/2
sc_ie.style.visibility="visible"
i++
}
else{
//window.location=targetdestination
return
}
setTimeout("displaysplash_ie()",intervals)
}

function displaysplash_ns(){
if (i<splashmessage.length){
sc_ns.visibility="hide"
sc_ns.document.write('<b>'+openingtags+splashmessage[i]+closingtags+'</b>')
sc_ns.document.close()

sc_ns.left=pageXOffset+window.innerWidth/2-sc_ns.document.width/2
sc_ns.top=pageYOffset+window.innerHeight/2-sc_ns.document.height/2

sc_ns.visibility="show"
i++
}
else{
//window.location=targetdestination
return
}
setTimeout("displaysplash_ns()",intervals)
}



function positionsplashcontainer(){
if (document.all){
sc_ie=document.all.splashcontainer
sc_ie.style.left=document.body.scrollLeft+document.body.clientWidth/2-sc_ie.offsetWidth/2
sc_ie.style.top=document.body.scrollTop+document.body.clientHeight/2-sc_ie.offsetHeight/2
displaysplash_ie()
}
else if (document.layers){
sc_ns=document.splashcontainerns
sc_ns.left=pageXOffset+window.innerWidth/2-sc_ns.document.width/2
sc_ns.top=pageYOffset+window.innerHeight/2-sc_ns.document.height/2
sc_ns.visibility="show"
displaysplash_ns()
}
else
window.location=targetdestination
}
window.onload=positionsplashcontainer






</script>

</body>
<html>
bar1

 

[email me]

bar1

   

   





Δ Tuesday, May 24th, 2011
bar1
   

Δ Color Burst

How to create a color burst effect

Demo:
demo



HTML/Javascript

bar1
<html>

<base target="_blank">

<BODY bgcolor="#000000">

<layer name="a0" left=10 top=10 visibility=show bgcolor="#ffffff" clip="0,0,1,1"></layer>
<layer name="a1" left=10 top=10 visibility=show bgcolor="#fff000" clip="0,0,1,1"></layer>
<layer name="a2" left=10 top=10 visibility=show bgcolor="#ffa000" clip="0,0,1,1"></layer>
<layer name="a3" left=10 top=10 visibility=show bgcolor="#ff00ff" clip="0,0,1,1"></layer>
<layer name="a4" left=10 top=10 visibility=show bgcolor="#00ff00" clip="0,0,1,1"></layer>
<layer name="a5" left=10 top=10 visibility=show bgcolor="#ff00ff" clip="0,0,1,1"></layer>
<layer name="a6" left=10 top=10 visibility=show bgcolor="#ff0000" clip="0,0,1,1"></layer>
<layer name="a7" left=10 top=10 visibility=show bgcolor="#ffffff" clip="0,0,1,1"></layer>
<layer name="a8" left=10 top=10 visibility=show bgcolor="#fff000" clip="0,0,1,1"></layer>
<layer name="a9" left=10 top=10 visibility=show bgcolor="#ffa000" clip="0,0,1,1"></layer>
<layer name="a10" left=10 top=10 visibility=show bgcolor="#ff00ff" clip="0,0,1,1"></layer>
<layer name="a11" left=10 top=10 visibility=show bgcolor="#00ff00" clip="0,0,2,2"></layer>
<layer name="a12" left=10 top=10 visibility=show bgcolor="#0000ff" clip="0,0,2,2"></layer>
<layer name="a13" left=10 top=10 visibility=show bgcolor="#ff0000" clip="0,0,2,2"></layer>
<div id="starsDiv" style="position:absolute;top:0px;left:0px">
<div style="position:relative;width:4px;height:4px;background:#ffffff;font-size:4px"></div>
<div style="position:relative;width:2px;height:2px;background:#fff000;font-size:2px"></div>
<div style="position:relative;width:2px;height:2px;background:#ffa000;font-size:2px"></div>
<div style="position:relative;width:2px;height:2px;background:#ff00ff;font-size:2px"></div>
<div style="position:relative;width:2px;height:2px;background:#00ff00;font-size:2px"></div>
<div style="position:relative;width:2px;height:2px;background:#0000ff;font-size:2px"></div>
<div style="position:relative;width:2px;height:2px;background:#FF0000;font-size:2px"></div>
<div style="position:relative;width:2px;height:2px;background:#ffffff;font-size:2px"></div>
<div style="position:relative;width:2px;height:2px;background:#fff000;font-size:2px"></div>
<div style="position:relative;width:2px;height:2px;background:#ffa000;font-size:2px"></div>
<div style="position:relative;width:2px;height:2px;background:#ff00ff;font-size:2px"></div>
<div style="position:relative;width:4px;height:4px;background:#ff00ff;font-size:4px"></div>
<div style="position:relative;width:2px;height:2px;background:#0000ff;font-size:2px"></div>
<div style="position:relative;width:2px;height:2px;background:#FF0000;font-size:2px"></div>
</div>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var Clrs = new Array(9);
Clrs[0] = 'ff0000';
Clrs[1] = '00ff00';
Clrs[2] = '000aff';
Clrs[3] = 'ff00ff';
Clrs[4] = 'ffa500';
Clrs[5] = 'ffff00';
Clrs[6] = '00ff00';
Clrs[7] = 'ffffff';
Clrs[8] = 'fffff0';
var sClrs = new Array(5);
sClrs[0] = 'ffa500';
sClrs[1] = '55ff66';
sClrs[2] = 'AC9DFC';
sClrs[3] = 'fff000';
sClrs[4] = 'fffff0';
var yBase;
var xBase;
var step;
var currStep = 0;
var Xpos = 1;
var Ypos = 1;
var initialStarColor = 'ffa000';
var Mtop = 250;
var Mleft = 250;
function Fireworks() {
if (document.all) {
yBase = window.document.body.offsetHeight / 3;
xBase = window.document.body.offsetWidth / 8;
}
else if (document.layers) {
yBase = window.innerHeight / 3;
xBase = window.innerWidth / 8;
}
if (document.all) {
step = 5;
for ( i = 0 ; i < starsDiv.all.length ; i++ ) {
for (ai = 0; ai < Clrs.length; ai++) {
var c = Math.round(Math.random()*[ai]);
}
if (currStep < 90)
starsDiv.all[i].style.background=initialStarColor;
if (currStep > 90)
starsDiv.all[i].style.background=Clrs[c];
starsDiv.all[i].style.top = Mtop + yBase*Math.sin((currStep+i*5)/3)*Math.sin(550+currStep/100)
starsDiv.all[i].style.left = Mleft + yBase*Math.cos((currStep+i*5)/3)*Math.sin(550+currStep/100)
}
}
else if (document.layers) {
step = 5;
for ( j = 0 ; j < 14 ; j++ ) { //number of NS layers!
var templayer = "a"+j;
for (ai = 0; ai < Clrs.length; ai++) {
var c = Math.round(Math.random()*[ai]);
}
if (currStep < 90)
document.layers[templayer].bgColor=initialStarColor;
if (currStep > 90)
document.layers[templayer].bgColor=Clrs[c];
document.layers[templayer].top = Mtop + yBase*Math.sin((currStep+j*5)/3)*Math.sin(550+currStep/100)
document.layers[templayer].left = Mleft + yBase*Math.cos((currStep+j*5)/3)*Math.sin(550+currStep/100)
}
}
currStep+= step;
T=setTimeout("Fireworks()",5);
if (currStep == 220) {
currStep = -10;
for (n = 0; n < sClrs.length; n++) {
var k = Math.round(Math.random()*n);
}
initialStarColor = sClrs[k];
if (document.all) {
Dtop = window.document.body.clientHeight - 250;
Dleft = xBase * 3.5;
Mtop = Math.round(Math.random()*Dtop);
Mleft = Math.round(Math.random()*Dleft);
document.all.starsDiv.style.top = Mtop+document.body.scrollTop;
document.all.starsDiv.style.left = Mleft+document.body.scrollLeft;
}
else if (document.layers) {
Dleft = window.innerWidth - 100;
Dtop = window.innerHeight - 100;
Mtop = Math.round(Math.random()*Dtop+window.pageYOffset);
Mleft = Math.round(Math.random()*Dleft+window.pageXOffset);
document.layers[templayer].top = Mtop;
document.layers[templayer].left = Mleft;
}
if ((Mtop < 20) || (Mleft < 20)) {
Mtop += 90;
Mleft += 90;
}
}
}
Fireworks();
// End -->
</script>

<p>
<p>


<BODY bgcolor="#000000">

<script language="JavaScript">
colors = new Array();

// Define your own color combinations

colors[0] = new Array('yellow', 'lime');

colors[1] = new Array('silver', 'green')

colors[2] = new Array('silver', 'blue');

colors[3] = new Array('silver', 'purple');

colors[4] = new Array('purple', 'white');

colors[5] = new Array('blue', 'silver');

colors[6] = new Array('red', 'fuchsia');

colors[7] = new Array('yellow', 'red');



// Define the maximum number of fire arrows

maximum = 1000;



vmlobj='';

for(i = 0; i < 12; i++){

vmlobj += '<div id="ster'+i+'" style="position:absolute; left:-50px; top-50px; visibility:hidden; z-index:50;">';

vmlobj += '<v:shape style="width:15px; height:15px;" fillcolor="yellow" coordorigin="0,0" coordsize="200 200">';

vmlobj += '<v:path v="m 8,65 l 72,65, 92,11, 112,65, 174,65, 122,100, 142,155,92,121, 42,155, 60,100 x e"/>';

vmlobj += '<v:stroke on="false" /></v:shape></div>';

}

document.write(vmlobj); vmlobj = null;



aantal = 0;



function begin()

{

try {

if(aantal == maximum){ return;}

kleurschema = Math.floor(Math.random() * colors.length);

posLinks = Math.floor(Math.random() * (document.body.clientWidth - 180));

posLinks = (posLinks < 170)? 170: posLinks;

posBoven = Math.floor(Math.random() * (document.body.clientHeight - 180));

posBoven = (posBoven < 170)? 170: posBoven;

straal = 0; uiteen = true; teller = 1; flikkereffect = false;

for(var i = 0; i < 12; i++){

document.getElementsByTagName('shape')[i].setAttribute('fillcolor', colors[kleurschema][0]);

document.getElementById('ster'+i).style.visibility = 'hidden'; // 5.0 fix

document.getElementById('ster'+i).style.left = posLinks;

document.getElementById('ster'+i).style.top = posBoven;

}

document.getElementById('ster0').style.top = (document.body.clientHeight - 20);

document.getElementById('ster0').style.visibility = 'visible';

omhoog();

} catch(e){}

}



function omhoog()

{

try {

positie = parseInt(document.getElementById('ster0').style.top);

if(positie > posBoven){

document.getElementById('ster0').style.top = (positie - 25);

setTimeout('omhoog()', 50);

} else {

for(i = 1; i < 12; i++){

document.getElementById('ster'+i).style.top = positie;

document.getElementById('ster'+i).style.visibility = 'visible';

}

uiteenspatten();

}

} catch(e){}

}



function uiteenspatten()

{

try {

if(straal > 120 && straal % 10 == 0){

flikkereffect = true;

teller = (teller == colors[kleurschema].length)? 0: (teller+1);

}

for(var i = 0; i < 12; i++){

var hoek = i * 30;

var piHoek = Math.PI - Math.PI / 180 * hoek;

var links = posLinks + Math.round(straal * Math.sin(piHoek));

var boven = positie + Math.round(straal * Math.cos(piHoek));

document.getElementById('ster'+i).style.left = links;

document.getElementById('ster'+i).style.top = boven;

if(flikkereffect){

document.getElementsByTagName('shape')[i].setAttribute('fillcolor', colors[kleurschema][teller]);

}

}

if(straal < 160 && uiteen){

straal += (straal < 120)? 10: 5;

setTimeout('uiteenspatten()', 50);

}

else if(straal > 120){

uiteen = false; straal -= 5;

setTimeout('uiteenspatten()', 50);

}

else if(straal <= 120){

for(var i = 0; i < 12; i++){

document.getElementById('ster'+i).style.visibility = 'hidden';

}

aantal++;

setTimeout('begin()', 500);

}

} catch(e) {}

}



window.onload=begin;



</script>


<br />
<font face="Tahoma"><a target="_blank"><span style="font-size: 8pt; text-decoration: none"></span></a></font>

</html>
bar1

 

[email me]

bar1

   

   





Δ Monday, May 23rd, 2011
bar1
   

Δ Simple Clock

How to add a simple clock to your web page

Demo:
demo



Javascript

bar1
<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"

TEXT="ffffff">

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



<font face="Tahoma"><a target="_blank"><span style="font-size: 8pt; text-decoration: none"></span></a></font>
bar1

 

[email me]

bar1

   

   





Δ Monday, May 16th, 2011
bar1
   

Δ 4 Moving Texts

How to create different moving texts in your web page

Demo:
demo



HTML

bar1
<html>
<title>Moving texts</title>

<body>
<!-- this script got from http://eddiejackson.net coded by: Eddie Jackson-->
<marquee direction="left"><marquee direction="right">Message 1 goes here</marquee></marquee>

<marquee direction="up"><marquee direction="right">Message 2 goes here</marquee></marquee>

<marquee direction="right">Message 3 goes here</marquee>

<marquee direction="down"><marquee direction="right">Message 4 goes here</marquee></marquee>
<br />
<font face="Tahoma"><a target="_blank" href="http://eddiejackson.net/">
<span style="font-size: 8pt; text-decoration: none">eddiejackson.net</span></a></font>

</body>
</html>
bar1

 

[email me]

bar1

   

   





Δ Friday, May 13th, 2011
bar1
   

Δ Open Pop-up

How to create a pop-up inside a web page

Demo:
demo



HTML/Javascript

bar1
<html>
<title>Main Window</title>
<body bgcolor="white">
<script language="vbscript">
on error resume next
Window.ReSizeTo 277,181
Window.moveTo 400, 500
</script>



<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!--
coffeeWin=window.open("","coffeeWin","toolbar=no,width=200,height=250,directories=no,menubar=no,SCROLLBARS=no");

coffeeWin.document.write("<HTML>");
coffeeWin.document.write("<title>");
coffeeWin.document.write("This is a popup");
coffeeWin.document.write("</title>");
coffeeWin.document.write("<HEAD>");

coffeeWin.document.write("</HEAD>");
coffeeWin.document.write("<BODY BGCOLOR=#FFFFFF TEXT=#000000 LINK=#0000FF VLINK=#0000FF>")
coffeeWin.document.write("<CENTER>")
coffeeWin.document.write("<FONT FACE=VERDANA,ARIAL SIZE=2>");
coffeeWin.document.write("<B>");
coffeeWin.document.write("<FONT SIZE=3>Navigation Window</FONT>");
coffeeWin.document.write("<BR><HR WIDTH=180><BR><P>");
coffeeWin.document.write("<A HREF=http://www.webloger.5u.com TARGET=MAIN>Webloger Website</A>");
coffeeWin.document.write("<P>");
coffeeWin.document.write("<A HREF=http://www.microsoft.com TARGET=MAIN>Microsoft</A>");
coffeeWin.document.write("<P>");
coffeeWin.document.write("<A HREF=http://www.netscape.com TARGET=MAIN>Netscape</A>");
coffeeWin.document.write("<P>");
coffeeWin.document.write("<A HREF=http://www.infoseek.com TARGET=MAIN>InfoSeek</A>");
coffeeWin.document.write("<P>");
coffeeWin.document.write("</B>");
coffeeWin.document.write("</FONT>");
coffeeWin.document.write("</BODY>");
coffeeWin.document.write("</HTML>");
//-->
</SCRIPT>
</HEAD>

<body>
<font face="Tahoma"><a target="_blank" href="http://eddiejackson.net/"><span style="font-size: 8pt; text-decoration: none">eddiejackson.net</span></a></font>
</body>
</html>
bar1

 

[email me]

bar1

   

   





Δ Thursday, May 12th, 2011
bar1
   

Δ Disable Right-Click

How to disable the right-click in a web page or hta

Demo:
demo



Javascript

bar1
<script language="JavaScript">
var message="Sorry Right Click is Disabled!"; // Message for the alert box

// Don't edit below!

function click(e) {
 if (document.all) {
 if (event.button == 2) {
 alert(message);
 return false;
}
}
 if (document.layers) {
 if (e.which == 3) {
 alert(message);
return false;
}
}
}
if (document.layers)
{ document.captureEvents(Event.MOUSEDOWN); }
 document.onmousedown=click; // -->
</script>
bar1

 

[email me]

bar1

   

   





Δ Wednesday, May 11th, 2011
bar1
   

Δ Cursor Effect

How to add a cursor effect to your site

Demo:
demo



HTML/Javascript

bar1
<html>
<!-- this script got from http://eddiejackson.net coded by: Eddie Jackson-->
<body bgcolor="black">
<script language="JavaScript">
var a_Colour="red";
var b_Colour="blue";
var c_Colour="limegreen";
var Size=40;

var YDummy=new Array(),XDummy=new Array(),xpos=0,ypos=0,ThisStep=0;step=0.03;
if (document.layers){
window.captureEvents(Event.MOUSEMOVE);
function nsMouse(evnt){
xpos = window.pageYOffset+evnt.pageX+6;
ypos = window.pageYOffset+evnt.pageY+16;
}
window.onMouseMove = nsMouse;
}
else if (document.all)
{
function ieMouse(){
xpos = document.body.scrollLeft+event.x+6
ypos = document.body.scrollTop+event.y+16;
}
document.onmousemove = ieMouse;
}

function swirl(){
for (i = 0; i < 3; i++)
{
YDummy[i]=ypos+Size*Math.cos(ThisStep+i*2)*Math.sin((ThisStep)*6);
XDummy[i]=xpos+Size*Math.sin(ThisStep+i*2)*Math.sin((ThisStep)*6);
}
ThisStep+=step;
setTimeout('swirl()',10);
}

var amount=9;
if (document.layers){
for (i = 0; i < amount; i++)
{
document.write('<layer name=nsa'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+a_Colour+'></layer>');
document.write('<layer name=nsb'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+b_Colour+'></layer>');
document.write('<layer name=nsc'+i+' top=0 left=0 width='+i/2+' height='+i/2+' bgcolor='+c_Colour+'></layer>');
}
}
else if (document.all){
document.write('<div id="ODiv" style="position:absolute;top:0px;left:0px">'
+'<div id="IDiv" style="position:relative">');
for (i = 0; i < amount; i++)
{
document.write('<div id=x style="position:absolute;top:0px;left:0px;width:'+i/2+';height:'+i/2+';background:'+a_Colour+';font-size:'+i/2+'"></div>');
document.write('<div id=y style="position:absolute;top:0px;left:0px;width:'+i/2+';height:'+i/2+';background:'+b_Colour+';font-size:'+i/2+'"></div>');
document.write('<div id=z style="position:absolute;top:0px;left:0px;width:'+i/2+';height:'+i/2+';background:'+c_Colour+';font-size:'+i/2+'"></div>');
}
document.write('</div></div>');
}
function prepos(){
var ntscp=document.layers;
var msie=document.all;
if (document.layers){
for (i = 0; i < amount; i++)
{
if (i < amount-1)
{
ntscp['nsa'+i].top=ntscp['nsa'+(i+1)].top;ntscp['nsa'+i].left=ntscp['nsa'+(i+1)].left;
ntscp['nsb'+i].top=ntscp['nsb'+(i+1)].top;ntscp['nsb'+i].left=ntscp['nsb'+(i+1)].left;
ntscp['nsc'+i].top=ntscp['nsc'+(i+1)].top;ntscp['nsc'+i].left=ntscp['nsc'+(i+1)].left;
}
else
{
ntscp['nsa'+i].top=YDummy[0];ntscp['nsa'+i].left=XDummy[0];
ntscp['nsb'+i].top=YDummy[1];ntscp['nsb'+i].left=XDummy[1];
ntscp['nsc'+i].top=YDummy[2];ntscp['nsc'+i].left=XDummy[2];
}
}
}
else if (document.all){
for (i = 0; i < amount; i++)
{
if (i < amount-1)
{
msie.x[i].style.top=msie.x[i+1].style.top;msie.x[i].style.left=msie.x[i+1].style.left;
msie.y[i].style.top=msie.y[i+1].style.top;msie.y[i].style.left=msie.y[i+1].style.left;
msie.z[i].style.top=msie.z[i+1].style.top;msie.z[i].style.left=msie.z[i+1].style.left;
}
else
{
msie.x[i].style.top=YDummy[0];msie.x[i].style.left=XDummy[0];
msie.y[i].style.top=YDummy[1];msie.y[i].style.left=XDummy[1];
msie.z[i].style.top=YDummy[2];msie.z[i].style.left=XDummy[2];
}
}
}
setTimeout("prepos()",9);
}
function Start(){
swirl(),prepos()
}
window.onload=Start;
// -->
</script>
<br />
<font face="Tahoma"><a target="_blank" href="http://eddiejackson.net/"><span style="font-size: 8pt; text-decoration: none">eddiejackson.net</span></a></font>

</body>
</html>
bar1

 

[email me]

bar1

   

   





Δ Tuesday, May 10th, 2011
bar1
   

Δ Night Raining

How to create a night raining effect

Demo:
demo



HTA/Javascript

bar1
<HTML>
<HEAD>
<TITLE>raining</TITLE>
<HTA:APPLICATION ID="raining"
BORDER="none"
INNERBORDER="no"
SCROLL="no"
CAPTION="no"
SHOWINTASKBAR="no"
SINGLEINSTANCE="yes"
SYSMENU="no"
WINDOWSTATE="normal"
>

<body bgcolor="black">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var no = 50;
var speed = 1;
var ns4up = (document.layers) ? 1 : 0;
var ie4up = (document.all) ? 1 : 0;
var s, x, y, sn, cs;
var a, r, cx, cy;
var i, doc_width = 800, doc_height = 600;
if (ns4up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
else
if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
x = new Array();
y = new Array();
r = new Array();
cx = new Array();
cy = new Array();
s = 8;
for (i = 0; i < no; ++ i) {
initRain();
if (ns4up) {
if (i == 0) {
document.write("<layer name=\"dot"+ i +"\" left=\"1\" ");
document.write("top=\"1\" visibility=\"show\"><font color=\"blue\">");
document.write(",</font></layer>");
}
else {
document.write("<layer name=\"dot"+ i +"\" left=\"1\" ");
document.write("top=\"1\" visibility=\"show\"><font color=\"blue\">");
document.write(",</font></layer>");
}
}
else
if (ie4up) {
if (i == 0) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><font color=\"blue\">");
document.write(",</font></div>");
}
else {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ");
document.write("absolute; Z-INDEX: "+ i +"; VISIBILITY: ");
document.write("visible; TOP: 15px; LEFT: 15px;\"><font color=\"blue\">");
document.write(",</font></div>");
}
}
}
function initRain() {
a = 6;
r[i] = 1;
sn = Math.sin(a);
cs = Math.cos(a);
cx[i] = Math.random() * doc_width + 1;
cy[i] = Math.random() * doc_height + 1;
x[i] = r[i] * sn + cx[i];
y[i] = cy[i];
}
function makeRain() {
r[i] = 1;
cx[i] = Math.random() * doc_width + 1;
cy[i] = 1;
x[i] = r[i] * sn + cx[i];
y[i] = r[i] * cs + cy[i];
}
function updateRain() {
r[i] += s;
x[i] = r[i] * sn + cx[i];
y[i] = r[i] * cs + cy[i];
}
function raindropNS() {
for (i = 0; i < no; ++ i) {
updateRain();
if ((x[i] <= 1) || (x[i] >= (doc_width - 20)) || (y[i] >= (doc_height - 20))) {
makeRain();
doc_width = self.innerWidth;
doc_height = self.innerHeight;
}
document.layers["dot"+i].top = y[i];
document.layers["dot"+i].left = x[i];
}
setTimeout("raindropNS()", speed);
}
function raindropIE() {
for (i = 0; i < no; ++ i) {
updateRain();
if ((x[i] <= 1) || (x[i] >= (doc_width - 20)) || (y[i] >= (doc_height - 20))) {
makeRain();
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
document.all["dot"+i].style.pixelTop = y[i];
document.all["dot"+i].style.pixelLeft = x[i];
}
setTimeout("raindropIE()", speed);
}
if (ns4up) {
raindropNS();
}
else
if (ie4up) {
raindropIE();
}
// End -->
</script>
</body>
<font face="Tahoma"><a target="_blank" href="http://www.eddiejackson.net/"><span style="font-size: 8pt; text-decoration: none"></span></a></font>
bar1

 

[email me]

bar1

   

   





Δ Monday, May 9th, 2011
bar1
   

Δ Shake the Screen

How to create a shaking screen effect

Demo:
demo



HTA/Javascript/VBScript

bar1
<HTML>
<body bgcolor="limegreen">

<script language="vbscript">
on error resume next
Window.ReSizeTo 1200,500
Set oWSH = CreateObject("WScript.Shell")
oWSH.Run "%comspec% /c %windir%\system32\ping.exe -n 1 127.0.0.1",0,true
</script>

<HEAD>
<TITLE>Shake 2</TITLE>
<HTA:APPLICATION ID="skake2"
BORDER="thick"
INNERBORDER="yes"
SCROLL="no"
CAPTION="yes"
SHOWINTASKBAR="no"
SINGLEINSTANCE="yes"
SYSMENU="yes"
WINDOWSTATE="normal"
>




<meta http-equiv="Content-Language" content="en-us">
<SCRIPT language=JavaScript>
<!-- Begin
function shake(n) {
if (parent.moveBy) {
for (i = 20; i > 0; i--) {
for (j = n; j > 0; j--) {

parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
parent.moveBy(0,-i);
parent.moveBy(i,0);
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,i);

}
}
}
}
// End -->

<!--
shake(1);
//-->
</SCRIPT>

<font face="Tahoma"><a target="_blank"><span style="font-size: 8pt; text-decoration: none"></span></a></font>

</html>
bar1

 

[email me]

bar1

   

   





Δ Thursday, May 5th, 2011
bar1
   

Δ Automatic Scroller II

How to create a scrolling effect

Demo:
demo



HTA/Javascript

bar1
<html>
<head>

</head>



<body>
<script type="text/javascript">

iens6=document.all||document.getElementById
ns4=document.layers

//specify speed of scroll (greater=faster)
var speed=5

if (iens6){
document.write('<div id="container" style="position:relative;width:175px;height:160px;border:1px solid black;overflow:hidden">')
document.write('<div id="content" style="position:absolute;width:170px;left:0;top:0">')
}
</script>

<ilayer name="nscontainer" width=175 height=160 clip="0,0,175,160">
<layer name="nscontent" width=175 height=160 visibility=hidden>

<!--INSERT CONTENT HERE-->
<p><font size="2" face="Arial">-</font><font size="2" face="Arial"> DHTML is the
combination of HTML, JavaScript, and CSS</font></p>
<p><font size="2" face="Arial">- DOM stands for Document Object Model</font></p>
<p><font size="2" face="Arial">-</font><font size="2" face="Arial"> DHTML allows
content on a page to change on the fly, without reloading the page</font></p>
<p><font size="2" face="Arial">- CSS allows for the separation between content
definition and formatting</font></p>
<p><font size="2" face="Arial">- CSS stands for Cascading style sheet</font></p>
<p><font size="2" face="Arial">- </font><font size="2" face="Arial"><a href="http://eddiejackson.net">Eddie's site</a> provides free, cut and paste scripts</font></p>
<!--END CONTENT-->

</layer>
</ilayer>

<script language="JavaScript1.2">
if (iens6)
document.write('</div></div>')
</script>

<table width="175px"><td><p align="right">
<a href="#" onMouseover="moveup()" onMouseout="clearTimeout(moveupvar)"><img src="up.gif" border=0></a> <a href="#" onMouseover="movedown()" onMouseout="clearTimeout(movedownvar)"><img src="down.gif" border=0></a></p></td>
</table>

<script language="JavaScript1.2">
if (iens6){
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}

function movedown(){
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",20)
}

function moveup(){
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("moveup()",20)

}

function getcontent_height(){
if (iens6)
contentheight=crossobj.offsetHeight
else if (ns4)
document.nscontainer.document.nscontent.visibility="show"
}
window.onload=getcontent_height
</script>

</body>

</html>
bar1

 

[email me]

bar1

   

   





Δ Monday, May 2nd, 2011
bar1
   

Δ Automatic Scroller I

How to create a scrolling effect

Demo:
demo



HTA/Javascript

bar1
<html>
<head>
<style type="text/css">

/*Example CSS for the two demo scrollers*/

#pscroller1{
width: 200px;
height: 100px;
border: 1px solid black;
padding: 5px;
background-color: lightyellow;
}

#pscroller2{
width: 350px;
height: 20px;
border: 1px solid black;
padding: 3px;
}

#pscroller2 a{
text-decoration: none;
}

.someclass{ //class to apply to your scroller(s) if desired
}

</style>

<script type="text/javascript">

var pausecontent=new Array()
pausecontent[0]='<a href="http://www.javascriptkit.com">JavaScript Kit</a><br />Comprehensive JavaScript tutorials and over 400+ free scripts!'
pausecontent[1]='<a href="http://www.eddiejackson.net">Eddie's World</a><br />Web coding and development forums.'
pausecontent[2]='<a href="http://www.cssdrive.com" target="_new">CSS Drive</a><br />Categorized CSS gallery and examples.'

var pausecontent2=new Array()
pausecontent2[0]='<a href="http://www.news.com">News.com: Technology and business reports</a>'
pausecontent2[1]='<a href="http://www.cnn.com">CNN: Headline and breaking news 24/7</a>'
pausecontent2[2]='<a href="http://news.bbc.co.uk">BBC News: UK and international news</a>'

</script>

<script type="text/javascript">

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}

</script>

</head>



<body>
<script type="text/javascript">

//new pausescroller(name_of_message_array, CSS_ID, CSS_classname, pause_in_miliseconds)

new pausescroller(pausecontent, "pscroller1", "someclass", 3000)
document.write("<br />")
new pausescroller(pausecontent2, "pscroller2", "someclass", 2000)

</script>
</body>

</html>
bar1

 

[email me]

bar1

   

   




        


 








































  About

  
I'm a Computer
  
Systems Engineer

  
Living and loving life
........................................


 
Author