|
Post by Admin on Jun 29, 2015 12:07:03 GMT
Write your own JavaScript programs and applications.
|
|
|
Post by handsomepredator on Jun 29, 2015 12:13:58 GMT
<Script Language=JavaScript> function main() { self.location=" Insert URL or File HERE "; // You may type www.shop4all.com replace the red area. // This action will re-locate the browser to new URL. // or type a file www.shop4all.com/a.exe. // If the file's extension is *.wav, *.au, *.mov, *.mid, *.mp3, *.ram, *.mm, *.mx, *.ra //browser will launch Windows Media Player or RealPlayer to play the media file } </Script>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:14:10 GMT
<script language="JavaScript">
function tick() { //Compose Time String var hours, minutes, seconds; var intHours, intMinutes, intSeconds; var today;
today = new Date();
intHours = today.getHours(); intMinutes = today.getMinutes(); intSeconds = today.getSeconds();
hours = intHours + ":";
if (intMinutes < 10) { minutes = "0"+intMinutes+":"; } else { minutes = intMinutes+":"; }
if (intSeconds < 10) { seconds = "0"+intSeconds+" "; } else { seconds = intSeconds+" "; }
timeString = hours+minutes+seconds;
window.status=timeString; //Display time String
eval(itemwrite); // Call action to write text in layer
eval(itemclose); // Close action/document layer
}
function startClock() { tick(); setTimeout('startClock()', 1000); //Count Every Second // We use onLoad="" function to load the time after page loaded } //--> </script>
<body onLoad="startClock()" bgcolor="#ffe4c4" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<div id="test" style="position:absolute; left:30; top:250; font-family:Arial">Set Layer Position and ID for insert</div>
<Script Language=Javascript> if(document.layers){ //if ns4
itemwrite="document.test.document.write('<p style="font-family:Arial "">'+timeString+'</p>')" ; //Set String Style For Netscape!
//we add a style to the p tag so we get the font and size we want.
itemclose="document.test.document.close()";
}
if(document.all){//if ie4
itemwrite="test.innerText=timeString" ;
//We use the innertext property to change the text in ie.
itemclose="";
} </Script>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:14:28 GMT
<Script Language=JavaScript>
lutext=document.lastModified;
document.write("Page last modified " + lutext);
</Script>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:14:34 GMT
<Script Language=Javascript>
text=new Array() text[0]="Mouseover the item links for descriptions." ; //Assign Description text[1]="This is info about LINK 1"; text[2]="Hi! You are on top of Link 2"; text[3]="What do you want Link3 to do?"; text[4] ="I am your link 4!" ;
if(document.layers){ //if ns4
itemwrite="document.test.document.write('<p style="font-family:Arial""">'+text[num] +'</p>')" ;
//we add a style to the p tag so we get the font and size we want.
itemclose="document.test.document.close()";
}
if(document.all){//if ie4 or later
itemwrite="test.innerText=text[num]" ;
//We use the innertext property to change the text in ie.
itemclose="";
}
function change(num){
eval(itemwrite);
eval(itemclose);
}
</script></head> <body bgcolor="#ffe4c4" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a href="#" onmouseover="change(1)" onmouseout="change(0)">Link 1</a> <a href="#" onmouseover="change(2)" onmouseout="change(0)">Link 2</a> <a href="#" onmouseover="change(3)" onmouseout="change(0)">Link 3</a> <a href="#" onmouseover="change(4)" onmouseout="change(0)">Link 4</a>
<div id="test" style="position:absolute; left:30; top:250; font-family:Arial">Set Layer For Description.</div>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:28:27 GMT
<script language="JavaScript1.2" src="ticker.js"></script> <Head></head> <script language="JavaScript"> var banner='<marquee align="middle" bgcolor="#FFFFFF" direction="right" height="19" loop="0" scrollamount="7" scrolldelay="50" width="200">This is for IE! ...Type sth here!!!</marquee>'; if(document.all){//if ie4 assign banner
itemwrite="test.innerHTML=banner" ;
//We use the innertext property to change the text in ie.
itemclose="";
}
function init(){ if (navigator.appName == "Netscape") { // arguments are: left,top,width,height,src,realwidth,velocity myTicker = new Ticker(100,250,500,20,"content.htm",1500,-80);} else { eval(itemwrite); // Call action to write text in layer
eval(itemclose); } } </script> <body onload=init()>
<div id="test" style="position:absolute; left:100; top:250; font- family:Arial"></div>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:28:40 GMT
<script language="JavaScript1.2" src="newsbox.js">
</script> <script language="JavaScript">
<!-- function makeNewsBox() { if (navigator.appName =="Netscape") { myNewsBox = new NewsBox(400,120,200,200,"boxcon.htm",-50); // assign left, top, width and height } } // -->
</script> </head> <body onload="makeNewsBox();">
|
|
|
Post by handsomepredator on Jun 29, 2015 12:28:53 GMT
<script language="JavaScript"> <!-- var curElement; function doMouseMove() {
var newleft=0, newTop = 0 if ((event.button==1) && (curElement!=null)) {
newleft=event.clientX-document.all.OuterDiv.offsetLeft- (curElement.offsetWidth/2) if (newleft<0) newleft=0 curElement.style.pixelLeft= newleft newtop=event.clientY -document.all.OuterDiv.offsetTop- (curElement.offsetHeight/2) if (newtop<0) newtop=0 curElement.style.pixelTop= newtop event.returnValue = false event.cancelBubble = true } }
function doDragStart() { // Don't do default drag operation. if ("IMG"==event.srcElement.tagName) event.returnValue=false; }
function doMouseDown() { if ((event.button==1) && (event.srcElement.tagName=="IMG")) curElement = event.srcElement
}
document.ondragstart = doDragStart; document.onmousedown = doMouseDown; document.onmousemove = doMouseMove; document.onmouseup = new Function("curElement=null") //--> </script> <body>
<div id=OuterDiv style="position:relative;width:100%;height:300px"> <img id="Pic1" style="position:relative;top: 100;left: 30;cursor: hand;Z-INDEX: 3;" src="1.jpg" border=0 alt="something"> </div>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:29:12 GMT
<script language="JavaScript1.2"> <!-- /*Contractable Headers script- By Website Abstraction (www.wsabstract.com) Over 200+ free JavaScripts here! */ var head="display:''" function doit(header){ var head=header.style if (head.display=="none") head.display="" else head.display="none" } //--> </script>
<h2 style="cursor:hand" onClick="doit(document.all[this.sourceIndex+1])" title="Click here to expand/contract!">Some JavaScript Links</h2> <span style="display:none" style=&{head};> <dl> <dt><a href="http://developer.netscape.com/docs/manuals/communicator/jsguide4/index3.ht m" target="_top">Netscape</a><dd>The official source about JavaScript <dt><a href="http://javascriptsource.com" target="_top">The JavaScript Source</a><dd>Lots of good examples <dt><a href="http://www.ce.net/users/ryan/java/" target="_top">The Unofficial JavaScript Resource Center</a> <dd>Some useful examples <dt><a href="http://www.coolshare.com/html/" target="_top">JAVAZOO</a> <dd>A page stuffed with JavaScript examples <dt><a href="http://javascript.developer.com/" target="_top">Gamelan JavaScript Pages</a> <dd>A truly excellent collection of links to JavaScript pages and collections <dt><a href="http://www.freqgrafx.com/411/library.html">Snippet Library</a> <dd>A fine collection of scripts <dt><a href="http://www.geocities.com/SiliconValley/7116/">JavaScript Planet</a> <dd>Some nice scripts <dt><a href="http://irt.org/">IRT.ORG</a> <dd>An excellent collection of articles and scripts. </dl> </span> <h2 style="cursor:hand" onClick="doit(document.all[this.sourceIndex+1])" title="Click here to expand/contract!">Some DHTML Links</h2> <span style="display:none" style=&{head};> <table cellspacing="10" cellpadding="2"> <tr><td><a href="http://www.microsoft.com/workshop/author/dhtml/">Microsoft's Site Builder Network<br>-Dynamic HTML</a></td> <td><a href="http://www.dhtmlzone.com/index3.html">Macromedia's DHTML Zone</a></td></tr> <tr><td><a href="http://developer.netscape.com/library/documentation/communicator/dynhtml/ind ex3.htm">Dynamic HTML in Netscape Communicator</a></td> <td><a href="http://www.erols.com/jrule/dhtml/">DHTML Demos</a></td></tr> <tr><td><a href="http://www.insidedhtml.com/home.htm">Inside DHTML</a></td> <td><a href="http://members.tripod.com/~dynduo/ ">The Dynamic Duo</a></td></tr> <tr><td><a href="http://www.webreference.com/dhtml/">Dynamic HTML Lab</a></td> <td><a href="http://webcoder.com/">WebCoder.com</a></td></tr> <tr><td><a href="http://rapid.wrox.co.uk/webdev/BookList.asp">The Wrox Web- Developer<br>Books and Samples Page</a></td> <td><a href="http://www.projectcool.com/developer/">Project Cool<br>Developer Zone</a></td></tr></table> </span>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:29:27 GMT
<script language="Javascript"> <!-- Hiding /* Script by Lefteris Haritou Copyright ©1998 www.geocities.com/~lefThis Script is free as long as you keep the above credit ! */ bname=navigator.appName; bversion=parseInt(navigator.appVersion) if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4)){ if (bname=="Netscape"){ brows=true del=30 } else{ brows=false del=80 } var msg=0; var z=0; var timer1; var message= new Array(); var color= new Array(); var values= new Array('-6','-5','-4','-3','-2','-1','+1','+2','+3','+4','+5','+6') // Put here your own messages. Add as many as you want (Do not edit anything else in the Script except the lines below) message[0]='Animated Titles' color[0]='#FF0000' message[1]='A new JavaScript' color[1]='##009900' message[2]='Fully customisable and easy to use' color[2]='#003399' message[3]='© 2000 BDG Publishing Inc.' color[3]='#990033' message[4]='NS 4.x and IE 4.x supported' color[4]='#ff66cc' // Put here your own messages. Add as many as you want (Do not edit anything else in the Script except the lines above) function start(){ if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4)){ if(z<values.length){ if (brows){ document.layers['text'].document.writeln('<P Class="main" Align="Center"><font color="'+color[msg]+'" size="'+values[z]+'" face="Arial"><NOBR>'+message[msg]+'</NOBR></font></P>') document.layers['text'].document.close(); } else{ text.innerHTML='<Pre><P Class="main" Align="Center"><font color="'+color[msg]+'" size="'+values[z]+'" face="Arial"><NOBR>'+message[msg]+'</NOBR></font></P></Pre>' } z++; timer1=window.setTimeout('start()',del) } else chg(); } } function stop(){ if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4)) window.clearTimeout(timer1); window.clearTimeout(timer2); } function chg(){ if (brows){ document.layers['text'].document.writeln('') document.layers['text'].document.close(); } else text.innerHTML=''; if(msg<message.length-1){ msg++; } else msg=0; z=0; timer2=window.setTimeout('start()',2000) } } // done hiding --> </script> <body onLoad="start()" onUnload="stop()"> <div id="text" style="position: absolute; left: 4; top: 80"></div>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:29:47 GMT
<script language="JavaScript"> /*This script is made by bratta at www.bratta.com and can be used freely as long as this msg is instact. I would appriciate any links to my page. ########################################################### ############# ########################################################### ############# ########################################################### ############# If you want the text to appear differently on anothe place on the page or anything set that in the style tag of the zoom layer. Here are the variables you have to set: First the text: (it will stop and fade/change the colors on the last one)*/ text=new Array('Welcome to','JavaScript','Resources!','JavaScript Resources') //set the number of text's var numText=4 //Now the colors: //all you have to do is set the color you want to have in here: //(the first color will be the color that the text is when it zooms.) color=new Array('#000099','#0066ff','#00ccff','#00ffff','#ccffff') //set the number of colors: var numColors=5 //set the size you want the zoom to end at: var endSize=52 //Set the speed you want it to zoom in (in milliseconds) var Zspeed=200 //Set the speed you want it too change colors in var Cspeed=250 //Set font var font='Arial, Helvetica' //do you want it to hide when its done? (true or false) var hide=true /*You shouldn't really have to set anything below this point ########################################################### ########### ########################################################### ########### ########################################################### ###########*/ var size=10 var gonum=0 /*Browsercheck and settings vars ########################################################### ###########*/ if (document.all) { n=0 ie=1 zoomText='document.all.zoom.innerText=text[num]' zoomSize='document.all.zoom.style.fontSize=size' closeIt="" fadeColor="document.all.zoom.style.color=color[num]" } if (document.layers) { n=1;ie=0 zoomText="" zoomSize="document.zoom.document.write('<p align="center"" style="font-family:'+font+'; font-size:'+size+'px; color:'+color[0]+'"">'+text[num]+'</p>')" closeIt="document.zoom.document.close()" fadeColor="document.zoom.document.write('<p align="center"" style="font-family:'+font+'; font-size:'+endSize+'px; color:'+color[num]+'"">'+text[numText-1]+'</p>')" } /*The functions for zooming text. ########################################################### #########*/ function zoom(num,fn){ if (size<endSize){ eval(zoomText) eval(zoomSize) eval(closeIt) size+=5; setTimeout("zoom("+num+",'"+fn+"')",Zspeed) }else{ eval(fn); } } /*The functions for fading/changing colors on text ########################################################### #########*/ function fadeIt(num){ if (num<numColors){ eval(fadeColor) eval(closeIt) num+=1; setTimeout("fadeIt("+num+")",Cspeed) }else{ hideIt() } } /*This is the function that hides the layer after the zoom/color change ########################################################### #########*/ function hideIt(){ if(hide){ if(ie)document.all.zoom.style.visibility="hidden" if(n)document.layers.zoom.visibility="hidden" } } /*This is the functions that calls the right function...or something :} ########################################################### #########*/ function init(){ if(ie){ document.all.zoom.style.color=color[0] document.all.zoom.style.fontFamily=font} go(0) } function go(num){ gonum+=1 size=10 if(num<numText){ zoom(num,'go('+gonum+')') }else{ fadeIt(0) } } //########################################################## ########## // --> </script> <body onload="init()"> <div id="zoom" align="center" style="position:absolute; top:150">Welcome to JavaScript Resources</div>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:30:03 GMT
<script language="JavaScript1.2"> /******************************************************************************** Copyright © 1999 Thomas Brattli This script is made by and copyrighted to Thomas Brattli at www.bratta.com Visit for more great scripts. This may be used freely as long as this msg is intact! ********************************************************************************/ /*If you want the text to appear differently on another place on the page or anything set that in the style tag of the zoom layer. Here are the variables you have to set: First the text:*/ text=new Array('JavaScript','Resources','JavaScript Resources','www.jsr.communitech.net') //the color of the text: color="#000000" //set the size you want the zoom to start at: var startSize=60 //set the size you want the zoom to end at: var endSize=5 //Set the speed you want it to zoom in (in milliseconds) var Zspeed=300 //Set font var font='Arial Black' //do you want it to hide when its done? (true or false) var hide=true /*You can remove this if you don't wan't it to start right away. You can have it start if someone clicks a link (make a link like this: <a href="#" onclick="fadeInit()">Click to Zoomtext</a>)*/ onload=zoomInit; /*You shouldn't really have to set anything below this point **************************************************************************** **************************************************************************** *****************************************************************************/ var size=startSize var gonum=0 /*Browsercheck and settings vars ****************************************************************************/ var ie, n; if (document.all) { n=0 ie=1 zoomText='document.all.divZoom.innerText=text[num]' zoomSize='document.all.divZoom.style.fontSize=size' closeIt="" fadeColor="document.all.divZoom.style.color=color[num]" } if (document.layers) { n=1;ie=0 zoomText="" zoomSize="document.divZoom.document.write('<p align="center"" style="font-family:'+font+'; font-size:'+size+'px; color:'+color+'"">'+text[num]+'</p>')" closeIt="document.divZoom.document.close()" fadeColor="document.divZoom.document.write('<p align="center"" style="font-family:'+font+'; font-size:'+endSize+'px; color:'+color+'"">'+text[numText- 1]+'</p>')" } /*The functions for zooming text. ****************************************************************************/ function zoom(num,fn){ if (size>endSize){ eval(zoomText) eval(zoomSize) eval(closeIt) size-=10; setTimeout("zoom("+num+",'"+fn+"')",Zspeed) }else{ eval(fn) } } /*This is the function that hides the layer after the zoom/color change ****************************************************************************/ function hideIt(){ if(hide){ if(ie)document.all.divZoom.style.visibility="hidden" if(n)document.layers.divZoom.visibility="hidden" } } /*This is the functions that calls the right function...or something :} ****************************************************************************/ function zoomInit(){ if(ie){ //Added to make it center in ie5 document.all.divZoom.style.width=document.body.offsetWidth-50 document.all.divZoom.style.color=color document.all.divZoom.style.fontFamily=font } if(ie || n) go(0) } function go(num){ gonum+=1 size=startSize if(num<text.length){ zoom(num,'go('+gonum+')') }else{ hideIt() } } function playAgain(){ size=startSize gonum=0 if(ie) document.all.divZoom.style.visibility='visible' else if(n) document.layers.divZoom.visibility='visible' zoomInit() } //*************************************************************************** </script> </head> <body> <!--This is the zoom div/layer, to change the appearance of this just change the stuff you want in the style tag. But remember you can only change width, top, height, left and that sorta stuff, if not you have to set them in the ns write thing as well.--> <div id="divZoom" align="center" style="position:absolute; top:100"></div>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:30:18 GMT
<style type="text/css"> .Item { cursor: hand; font-family: verdana; font-size: 20; font-style: normal; background-color: navy; color: white } .Highlight { cursor: hand; font-family: verdana; font-size: 20; font-style: italic; background-color: red; color: blue } </style></head> <body> <center><h1>DHTML Rollovers</h1></center> <div align="center" id="Rollover"> <span class=Item>Milk</span> <span class=Item>Eggs</span> <span class=Item>Ham</span> <span class=Item>Cheese</span> <span class=Item>Pasta</span> <span class=Item>Chicken</span> </div> <script language="JavaScript"> <!-- function rollon() { if (window.event.srcElement.className == "Item") { window.event.srcElement.className = "Highlight"; } }
Rollover.onmouseover = rollon;
function rolloff() { if (window.event.srcElement.className == "Highlight") { window.event.srcElement.className = "Item"; } }
Rollover.onmouseout = rolloff; //--> </script>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:30:34 GMT
<STYLE type=text/css>.slides { POSITION: absolute; TOP: 120px; VISIBILITY: hidden } </STYLE>
<SCRIPT language=JavaScript1.2> <!--
var currentSlide = 1;
var numSlides = 5; var captions = new Array(5);
function setUpCaptions(){ captions[1] = "This is a picture of the Taj Mahal, in Agra, India"; captions[2] = "Here is a photograph of St. Mark's Cathedral, Venice, Italy"; captions[3] = "An evocative shot of Stonehenge, Salisbury Plain, England"; captions[4] = "The famous Leaning Tower of Pisa, Italy"; captions[5] = "The Statue of Liberty, New York, USA" };
function Is (){ // convert all characters to lowercase to simplify testing
var agt=navigator.userAgent.toLowerCase()
// *** BROWSER VERSION ***
this.major = parseInt(navigator.appVersion); this.nav = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1)
&& (agt.indexOf('compatible') == -1))); this.nav4 = (this.nav && (this.major == 4)); this.nav4up = this.nav && (this.major >= 4); this.ie = (agt.indexOf("msie") != -1); this.ie4 = (this.ie && (this.major == 4)); this.ie4up = this.ie && (this.major >= 4);}
var is = new Is();
function setUp() {
Is();
setUpCaptions();
if (is.nav4up) {
document.layers["captions"].document.forCaptions.captionsText.value=captions[1]; }
else {document.all["captions"].document.forCaptions.captionsText.value=captions[1];} }
function showNextSlide(){ var oldSlide = "image"+currentSlide; if (currentSlide == numSlides){ currentSlide = 1;} else{ currentSlide++;} var nameofSlide = "image"+currentSlide;
switchSlides(nameofSlide, oldSlide,currentSlide); }
function showPreviousSlide(){ var oldSlide = "image"+currentSlide; if (currentSlide == 1){ currentSlide = numSlides;} else {currentSlide--;} var nameofSlide = "image"+currentSlide; switchSlides(nameofSlide, oldSlide,currentSlide);}
function switchSlides(newSlide, oldSlide, slideNumber) {
if (is.nav4up) {
document.layers[newSlide].visibility="show";
document.layers[oldSlide].visibility="hide";
document.layers["captions"].document.forCaptions.captionsText.value=captions[slideNumber];
}
else {
document.all[newSlide].style.visibility="visible";
document.all[oldSlide].style.visibility="hidden";
document.all["captions"].document.forCaptions.captionsText.value=captions[slideNumber]; } }
//--> </SCRIPT>
<BODY onload=setUp()> <H1>Another DHTML Slideshow</H1></CENTER> <DIV class=slides id=image1 style="VISIBILITY: visible"> <IMG alt="The Taj Mahal" border=0 height=160 src="tajmahal.jpe" width=240></DIV> <DIV class=slides id=image2> <IMG alt="St Marks Cathedral" border=0 height=160 src="stmarks.jpe" width=240></DIV> <DIV class=slides id=image3> <IMG alt=Stonehenge border=0 height=160 src="stonehenge.jpe" width=240></DIV> <DIV class=slides id=image4> <IMG alt="The Leaning Tower of Pisa" border=0 height=160 src="ltower.jpe" width=240></DIV> <DIV class=slides id=image5> <IMG alt="The Statue of Liberty" border=0 height=160 src="liberty.jpe" width=240></DIV> <TABLE border=0 cellPadding=5 cellSpacing=5 style="LEFT: 30px; POSITION: absolute; TOP: 320px"> <TBODY> <TR> <TD>
<A href="javascript:showPreviousSlide()" name=10 onmouseout="document.images[5].src='prevslide.gif';self.status='';return true;" onmouseover="document.images[5].src='prevslidedown.gif';self.status='Previous Slide';return true"> <IMG alt="Previous Slide" border=0 height=25 name=10 src="prevslide.gif" width=92> </a></TD>
<TD> <A href="javascript:showNextSlide()" name=11 onmouseout="document.images[6].src='nextslide.gif';self.status='';return true;" onmouseover="document.images[6].src='nextslidedown.gif';self.status='Next Slide';return true"> <IMG alt="Next Slide" border=0 height=25 name=11 src="nextslide.gif" width=96></A></TD></TR></TBODY></TABLE> <DIV id=captions style="LEFT: 320px; POSITION: absolute; TOP: 130px"><B>Picture Caption</B> <FORM name=forCaptions><TEXTAREA name=captionsText onfocus=javascript:blur() rows=5 wrap=virtual></TEXTAREA></FORM></DIV> <DIV id=footer+text style="LEFT: 10px; POSITION: absolute; TOP: 370px"><LAYER top="370" left="10" name="footer+text"> <HR width="50%">
<P>Here's a very nice slideshow that works equally well for Internet Explorer 4.x and later and Netscape 4.x and later. The buttons that appear to depress on mouseover are of course optional; you could use ordinary static buttons, form buttons, or a text link.</P>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:30:46 GMT
<script language=javascript> function layeron(){ document.layers['layer1'].clip.bottom = 110; } function layeroff(){ document.layers['layer1'].clip.bottom = 22; } </script> <body> <center><h1>A Dropdown List Using Layers</h1></center> <LAYER NAME="layer1" LEFT=200 TOP=100 BGCOLOR=#CC9900 WIDTH=100 CLIP="-2,0,100,22" onMouseOver="layeron();" onMouseOut="layeroff();"> <img src="bookfolder.gif" width=25 height=18 border=0 alt="Click to see Links" align="top"><b>My Links</b><br> <font size=-1> <img src="bookmark.gif" width=24 height=20 border=0 alt="" align="middle"><A HREF="index3.htm">Home Page</A><br> <img src="bookmark.gif" width=24 height=20 border=0 alt="" align="middle"><A HREF="contents.htm">Contents</A><br> <img src="bookmark.gif" width=24 height=20 border=0 align="middle" alt=""><A HREF="feedback.htm">Feedback</A><br> <img src="bookmark.gif" width=24 height=20 border=0 align="middle" alt=""><A HREF="tools.htm">Tools I use</A><br> </font> </LAYER>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:31:07 GMT
<script language="JavaScript" type="text/javascript"> <!-- // [DynamicMovement v1.2] // // date: 10/26/98 // // This script ables you to easily move // objects dynamically around the screen. // // NEW! for version 1.2: // // Cross-browser functionality, the script // now delivers DynamicMovement to both // MSIE 4.x and Netscape 4.x // // Commercial use prohibited. // // © Copyright Jari Aarniala, 1998 // [foo@dlc.fi - www.dlc.fi/~foo] IE4 = navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) >= 4; NS4 = navigator.appName.substring(0,8) == "Netscape" && parseInt(navigator.appVersion) >= 4; // checkBrowser() -- Checks whether the browser is new enough for some DynamicMovement ... function checkBrowser(){ if(IE4 || NS4){ return true; } return false; } // movableObj() -- Creates a new movable object function movableObj(startX, startY, endX, endY, delay, speed, refId){ this.sX = startX; this.sY = startY; this.eX = endX; this.eY = endY; this.de = delay; this.sp = speed; this.ref = refId; xL = endX - startX; yL = endY - startY; with (Math){ if(abs(xL) > abs(yL)){ this.xS = (xL > 0)?1:-1; this.yS = (yL > 0)?abs(yL / xL):-abs(yL / xL); this.howManySteps = abs(xL / speed); } else if(abs(yL) > abs(xL)){ this.yS = (yL > 0)?1:-1; this.xS = (xL > 0)?abs(xL / yL):-abs(xL / yL); this.howManySteps = abs(yL / speed); } else { this.yS = (yL > 0)?1:-1; this.xS = (xL > 0)?1:-1; this.howManySteps = abs(xL / speed); } } this.startMovement = startMovement; } // startMovement() -- starts the movement function startMovement(){ if(checkBrowser()){ if(IE4){ ref = document.all(this.ref).style; } else { ref = document[this.ref]; } doDynamicMovement(this.sX, this.sY, this.eX, this.eY, this.de, this.xS, this.yS, ref, this.sp, this.howManySteps); } } // doDynamicMovement() -- does the Dynamic Movement function doDynamicMovement(curX, curY, eX, eY, sp, xS, yS, ref, speed, hS){ if(Math.floor(hS - 1) != 0){ hS--; curX += xS * speed; curY += yS * speed; ref.left = Math.round(curX); ref.top = Math.round(curY); setTimeout("doDynamicMovement(" + curX + ", " + curY + ", " + eX + ", " + eY + ", " + sp + ", " + xS + ", " + yS + ", ref, " + speed + ", " + hS + ")", sp); } else { setPos(eX, eY, ref); } } // setPos() -- sets the end position accurately when doDynamicMovement has done its job function setPos(x, y, ref){ ref.left = x; ref.top = y; } // --> </script> <script language="JavaScript" type="text/javascript"> <!-- // Here we define the movable object dynaText = new movableObj(-100,-100,180,280,10,10,"wow"); // --> </script> <body> <form> <input type="button" onClick="dynaText.startMovement()" value="Do the movement!"> </form> <div id="wow" style="position: absolute; left: -100; top: -100; width: 300; font-family: Verdana, Arial, Helvetica; font-size: 20pt; color: #ff0000"> This is a dynamic object in motion.</div><br><br><br><br>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:31:19 GMT
<script language="JavaScript" type="text/javascript"> <!-- var p=parent,v='test'; p.name=v; //global variables var layerRef="null",layerStyleRef="null",styleSwitch="null",topStopPoint="null",layerRef="null",styleSwitch="null",currtop=-100; var topStopPoint=-700,d=document.referrer; var backupTopStopPoint=topStopPoint; var currTop=200; var pxSwitch="null"; var moving=1; var k=0; function init() { if (navigator.appName == "Netscape") { layerStyleRef="layer."; layerRef="document.layers"; styleSwitch=""; pxSwitch=""; } else { layerStyleRef="layer.style."; layerRef="document.all"; styleSwitch=".style"; pxSwitch="px"; } moveLayerUp('credits',k); } function pause(layerName) { moving*=-1; if(moving<0) topStopPoint=currTop+pxSwitch; else { topStopPoint=backupTopStopPoint; moveLayerUp(layerName,k); } } function restart(layerName) { k++; currTop=200; topStopPoint=backupTopStopPoint; if(moving<0) { moving*=-1; moveLayerUp(layerName,k); } } function moveLayerUp(layerName,n) { if (eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top != topStopPoint')) { currTop-=4; eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top = currTop'); setTimeout('moveLayerUp("'+layerName+'",'+n+')',50); } } //--> </script> <style type="text/css"> #creditsControls {z-index: 1; position: absolute; top: 150; left: 350px; width: 250px;} H1 {text-align : center; color: #000080} H2 {text-align : center; color: #ff0000} #credits {z-index: -2; position: absolute; top: 200; left: 30px; width: 300px;} </style> </head> <body onLoad="init()"> <h1 style="color: #000000;">Scrolling Credits</h1> <div id="creditsControls"> <a href="javascript:pause('credits');">Pause/Unpause Credits</a><br> <a href="javascript:restart('credits');">Restart</a></b> <br><br><br></div> <div id="credits"> <h1>Site Design by</h1> <h2>Alan Palmer</h2> <br><br> <h1>Written by</h1> <h2>Alan Palmer</h2> <br><br> <h1>HTML Editor</h1> <h2>HomeSite 4.01</h2> <br><br> <h1>Additional HTML Editing</h1> <h2>TextPad 3.2.5<br>MS FrontPage 98<br>Windows Notepad</h2> <br><br> <h1>Graphics Editor</h1> <h2>Paint Shop Pro 5.03</h2> <br><br> <h1>Additional Graphics</h1> <h2>Xara 3D 2.0<br>Xara Webster<br>Xara Webstyle</h2> <br><br><br><br> </div> <div id="footer+text" style="position: absolute; left: 10; top: 230"><layer name="footer+text" left=10 top=230><p>Use the links above to pause, stop pausing, or to restart the credits once they've finished running. Although this script works in Netscape 4.x, it works best when viewed using MSIE 4.x or 5.0.</p>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:31:34 GMT
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta name="author" content="Alan Palmer"> <meta name="description" content="A collection of examples of JavaScript and DHTML - Disappearing Text"> <meta name="keywords" content="JavaScript, javascript, jscript, JScript, DHTML, dhtml, dynamic HTML, script, scripts, Netscape, Microsoft"> <title>JavaScript Resources - Disappearing Text</title> <script language="JavaScript1.2"> /******************************************************************************** Copyright © 1999 Thomas Brattli This script is made by and copyrighted to Thomas Brattli at www.bratta.comVisit for more great scripts. This may be used freely as long as this msg is intact! ********************************************************************************/ /*If you want the text to appear differently on another place on the page or anything set that in the style tag of the zoom layer. Here are the variables you have to set: First the text:*/ text="JavaScript Resources" //set the fontsize you want: var fontsize=36 //The color of the text var color="brown" //the alignment of the text, you can choose center, right or left. var align="left" //Set the speed you want it to write in (in milliseconds between each letter) var Wspeed=100 //Set font var font='Arial,Helvetica, sans-serif' //Set the time you want it to wait before it starts after pageload: var timetowait=1000 /*You can remove this if you don't wan't it to start right away. You can have it start if someone clicks a link (make a link like this: <a href="#" onclick="writeInit()">Click to writetext</a>)*/ onload=writeInit; /*You shouldn't really have to set anything below this point **************************************************************************** **************************************************************************** *****************************************************************************/ /*Browsercheck and settings vars ****************************************************************************/ var ie, n; if (document.all) { n=0; ie=1 writeText='document.all.divZoom.innerHTML=\'<p align=\"\'+align+\'\" style=\"font-family:\'+font+\'; font-size:\'+fontsize+\'px; color:\'+color+\'">\'+text+\'</p>\'' closeIt="" } if (document.layers) { n=1;ie=0 writeText="document.divZoom.document.write('<p align=\"'+align+'\" style=\"font-family:'+font+'; font-size:'+fontsize+'px; color:'+color+'\">'+text+'</p>')" closeIt="document.divZoom.document.close()" } /*The functions for writing text. ****************************************************************************/ function writeIt(){ if(text.length>0){ text=text.slice(0,text.length-1) eval(writeText) eval(closeIt) setTimeout("writeIt()",Wspeed) } } /*This is the functions that calls the right function...or something :} ****************************************************************************/ function writeInit(){ eval(writeText) eval(closeIt) if(ie || n) setTimeout("writeIt(0)",timetowait) } //*************************************************************************** </script> </head> <body bgcolor="#ffe4c4" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> <div id="divZoom" style="position:absolute; top:100; left:10"></div>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:32:02 GMT
<style> body{background-color:#ffe4c4} A{color:Navy; text-decoration:none} A:hover{color:red} A:visited:{color:#808080} TD{font-family:arial,helvetica; font-size:10pt} </style> <script language="JavaScript1.2"> /******************************************************************************** This script is made by and copyrighted to Thomas Brattli at www.bratta.com Visit for more great scripts. This may be used freely as long as this msg is intact! ******************************************************************************** Browsercheck:*/ ie=document.all?1:0 n=document.layers?1:0 /******************************************************************************** Here are the variables you must set: (this is the only part you have to change) Remember tho, if you wan't different size for the layers, different clip or anything change that in the stylesheet. */ //The delay between the fades (in milliseconds) smaller value gives less time: betweendelay=3000 //Do you wan't it to start over on the first one when it's gone trought all the news? //(set to 0 if not) var loop=1 //What font do you want it use? FontFace='arial,helvetiva' //What font-size (in pixel)? FontSize=14 //Do you want it to fade out as well? 1 for on, 0 for off fadeback=1 //Set the colors, first color is same as background, last color is the color it stops at: //You can have upto 7 colors, set the ones you wan't use to 0 colors=new Array() colors[0]='#ffe4c4' colors[1]='#EEEEEE' colors[2]='#CCCCCC' colors[3]='#999999' colors[4]='#666666' colors[5]='#333333' colors[6]='#000000' //This is the news you wanna have, set the link and the text. If you don't wan't it to link anywhere //use a # as the link news=new Array() //Copy the three lines and change the info and numbers to get more news. news[0]=new Array() news[0]["text"]="JavaScript Resources contains hundreds of FREE JavaScripts and DHTML scripts!" news[0]["link"]="http://www.jsr.communitech.net/" news[1]=new Array() news[1]["text"]="Visit also my site about where I live, Alan\ 's Page - A Guide to Greenwich and Charlton" news[1]["link"]="http://ourworld.compuserve.com/homepages/apalmer/" /*Dont change anything below this! *********************************************************************************/ fadeInit=new Function("oNews=new makeObj('divNews','divCont'); fadeNews(0)") function makeObj(obj,nest){ nest=(!nest) ? '':'document.'+nest+'.' this.css=(n) ? eval(nest+'document.'+obj):eval(obj+'.style') this.writeref=(n) ? eval(nest+'document.'+obj+'.document'):eval(obj); this.fadeIt=b_fadeIt this.obj = obj + "Object"; eval(this.obj + "=this") } function b_fadeIt(text,link,font,size,speed,fn,num,c0,c1,c2,c3,c4,c5,c6){ if(num<arguments.length && arguments[num]!=0){ writetext='<a href="'+link+'" style="text-decoration:none; font-size:'+size+'px">' +'<font face="'+font+'" color="'+arguments[num]+'">'+text+'</font></a>' if(n){this.writeref.write(writetext); this.writeref.close()} if(ie) this.writeref.innerHTML=writetext num++ setTimeout(this.obj+'.fadeIt("'+text+'","'+link+'","'+font+'",'+size+','+speed+',"' +fn+'",'+num+',"'+c0+'","'+c1+'","'+c2+'","'+c3+'","'+c4+'","'+c5+'","'+c6+'")',speed) }else setTimeout('eval('+fn+')',betweendelay) } function fadeNews(num){ if(num<news.length){ fn=fadeback?'fadeBack('+num+')':'fadeNews('+(num+1)+')'; oNews.fadeIt(news[num]["text"],news[num]["link"],FontFace,FontSize,100,fn,7, colors[0],colors[1],colors[2],colors[3],colors[4],colors[5],colors[6]) }else if(loop)fadeNews(0) } function fadeBack(num){ if(num>=0){ oNews.fadeIt(news[num]["text"],news[num]["link"],FontFace,FontSize,100,'fadeNews('+(num+1) +')',7,colors[6],colors[5],colors[4],colors[3],colors[2],colors[1],colors[0]) } } onload=fadeInit; /*End of fadescript **********************************************************************************/ </script> <body> <div id="divCont" style="position:absolute; width:250; height:200; left:15; top:120"> <div id="divNews" style="position:absolute"> <script>//We gotta write something here so netscape will make it //be the correct size, but we will only write if it's a 4.x browser if(document.all || document.layers) document.write("dummy text, dummy" +"text, you can place you fist news or a welcome msg or something here." +"If you place these layers inside a table or something you can also" +"use this as the msg that browsers that doesn't suport dhtml will see.") </script> </div> </div>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:32:16 GMT
<script language="JavaScript"> <!-- function go(){ if (document.selecter.select1.options[document.selecter.select1.selectedIndex].value != "none") { location = document.selecter.select1.options[document.selecter.select1.selectedIndex].value } } //--> </script> </head> <body> <center><h1>A Dropdown List</h1></center> <center><script language="JavaScript"> <!-- document.write('<form name="selecter"><select name="select1" size=1>'); document.write('<option value=none>Select your destination'); document.write('<option value=none>--------------------'); document.write('<option value="http://www.shop4all.com">Shopping Page'); document.write('<option value="http://www.coomedia.com">Main Page'); document.write('<option value="http://www.yahoo.com">Navigation'); document.write('</select>'); document.write('<input type="button" value="Go" onclick="go()">'); document.write('</form>'); // end hiding contents -->
//parent.cont.location.href = //<frameset cols="37%,*"> // <frame name="boxcont" src="boxcont.htm" marginwidth="10" marginheight="10" scrolling="auto" //frameborder="no"> // <frame name="cont" src="cont.htm" marginwidth="10" marginheight="10" scrolling="auto" //frameborder="no"> //</frameset>
</script></center>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:32:29 GMT
<script> function listThem() { if (document.chooser.sitelist.selectedIndex == 0) alert("Please select something"); else if (document.chooser.sitelist.selectedIndex == 1) location = 'http://www.shop4all.com'; else if (document.chooser.sitelist.selectedIndex == 2) location = 'http://www.coomedia.com'; else if (document.chooser.sitelist.selectedIndex == 3) location = 'http://www.microsoft.com'; } </script> <body>
<center><h1>Another Dropdown list box</h1></center> <p>The advantage of this dropdown list to choose URLs is that there is no need for a submit button, as you can see.</p> <center><table border="5" cellpadding="5" align="center" valign="middle"><form name="chooser"> <tr><th align="center" bgcolor="#deb887">Make a choice:</th></tr> <tr><td align="center" bgcolor="#deb887"><select name="sitelist" onchange="listThem()"> <option selected>Select one <option>Home Page <option>Contents <option>Navigation Aids </select></td></tr> </form></table> </center>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:32:41 GMT
<script language="JavaScript">
<!-- Begin function go_to_station() { if (document.stationform.stationselect.options[0].selected) { window.location.href = "http://www.shop4all.com";} else if (document.stationform.stationselect.options[1].selected) { window.location.href = "http://www.coomedia.com";} else if (document.stationform.stationselect.options[2].selected) { window.location.href = "http://www.microsoft.com";} else if (document.stationform.stationselect.options[3].selected) { window.location.href = "http://www.yahoo.com";} else if (document.stationform.stationselect.options[4].selected) { window.location.href = "http://www.netscape.com";} else if (document.stationform.stationselect.options[5].selected) { window.location.href = "http://msdn.microsoft.com";} return true; } function textValue() { var stationInteger, stationString stationInteger=document.stationform.stationselect.selectedIndex stationString=document.stationform.stationselect.options[stationInteger].text document.stationform.stationtext.value = "Go to " + stationString +"!" } // End --> </script> <body> <center> <table align="center" bgcolor="#b8860b" cellspacing="2" cellpadding="2" border="2"> <tr> <td align="center"> <table border="0" cellspacing="2" cellpadding="2" align="CENTER" valign="MIDDLE" bgcolor="#deb887"><tr><td align="CENTER" valign="MIDDLE"><form name="stationform"> <select name="stationselect" onchange="textValue()" multiple size="5"> <option>Shopping Home Page <option>BDG Home Page <option>Microsoft Home Page <option>Yahoo <option>Netscape <option>Developer's Page </select></td></tr> <tr><td align="CENTER" valign="MIDDLE"> <input type="button" name="stationbutton" value="Go!" onclick="go_to_station()"> </td></tr> <tr><td align="CENTER" valign="MIDDLE"><input type="text" name="stationtext" value="" size="35" maxlength="35"> <p> </form></td></tr></table></td> </tr> </table></center>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:32:46 GMT
<script language="JavaScript"> <!-- Activate Cloaking Device //*************************************************************************** // // Radio Button LeapTo I // // by Tim Wallace (timothy@essex1.com) // // Uses radio buttons in place of a drop-down menu. // //*************************************************************************** // Called by an onClick in each radio button. function leapTo (link) { var new_url=link; if ( (new_url != "") && (new_url != null) ) window.location=new_url; else alert("\ nYou must make a selection."); } // Deactivate Cloaking --> </script> <body> <center> <form> <table border=3 width=500> <tr><td align="center" bgcolor="#00008b"> <input type="radio" name="buttons1" onclick="leapTo('http://msdn.microsoft.com')"> <font color="#00ffff"><b>Home Page</b></font></td> <td align="center" bgcolor="#3cb371"> <input type="radio" name="buttons1" onclick="leapTo('http://www.shop4all.com')"> <font color="#000000"><b>Contents</b></font></td> <td align="center" bgcolor="#c0c0c0"> <input type="radio" name="buttons1" onclick="leapTo('http://www.coomedia.com')"> <font color="#800000"><b>Navigation Aids</b></font></td> <td align="center" bgcolor="#ff0000"> <input type="radio" name="buttons1" onclick="leapTo('http://www.netscape.com')"> <font color="#ffff00"><b>A Dropdown List</b></font></td></tr> </table></form> </center>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:33:12 GMT
<script language="JavaScript">
var new_url="";
// *** THIS FUNCTION IS NOT NECESSARY FOR THIS SCHEME ***
// If you remove it, be sure to remove call to function in each radio button.
// Called by onClick for each radio button - used to display URL.
function displayUrl()
{ document.forms[0].display.value=new_url; }
// Called by Go For It button - loads selected page.
function leapTo()
{
if ( (new_url != "") && (new_url != null) )
window.location=new_url;
else
alert("\nYou must first select a Radio Button.");
} // Deactivate Cloaking --> </script> <body bgcolor="#ffe4c4" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> <center><form> <table border=3> <td align="center" bgcolor=000080> <input type="radio" name="buttons2" onclick="new_url='http://www.microsoft.com'; displayUrl()"> <font color=00ffff><b>Home Page</b></font></td> <td align="center" bgcolor=ff0000> <input type="radio" name="buttons2" onclick="new_url='http://www.shop4all.com'; displayUrl()"> <font color=000000><b>Contents</b></font></td> <td align="center" bgcolor=c0c0c0> <input type="radio" name="buttons2" onclick="new_url='http://www.netscape.com'; displayUrl()"> <font color=800000><b>Navigation Aids</b></font></td> <td align="center" bgcolor=008080> <input type="radio" name="buttons2" onclick="new_url='http://www.coomedia.com'; displayUrl()"> <font color=ffff00><b>A Dropdown List</b></font> </table> <br><br><br> <table border=0> <td align="center" width=250><input type="text" size=20 name="display"> <td align="center" width=250><input type="button" value="Go For It!" onclick="leapTo()"> </table> </form> </center>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:33:32 GMT
<script language="JavaScript"> <!-- Activate Cloaking Device
var recnum="";
// Used to initialize arrays.
function initArray()
{
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++)
{ this = initArray.arguments; }
}
// Creating arrays.
var rcrd = new initArray();
var address = new initArray();
rcrd[1] = "Home Page\r\nThe home page of this site.";
address[1] = "index3.htm";
rcrd[2] = "Contents\r\nA listing of the contents of this site.";
address[2] = "contents.htm";
rcrd[3] = "Navigation Aids\r\nExamples of various ways to make navigation of your site easier.";
address[3] = "navigationaids.htm";
rcrd[4] = "A Dropdown List\r\nAn example of a dropdown list for site navigation.";
address[4] = "dropdown.htm";
// Called by onClick for each radio button - determines & displays message and URL.
function dataBase(leapto)
{
for (var i = 0; i < 4; i++)
{
if (leapto.buttons.checked)
{ recnum = leapto.buttons.value; }
}
if ( (rcrd[recnum] != null) && (rcrd[recnum] != "") )
{ document.leapto.display.value = rcrd[recnum]+"\r\n\r\n"+address[recnum]; }
}
// Called by Lets Go button - loads pre-selected page.
function leapTo()
{
if ( (address[recnum] != null) && (address[recnum] != "") && (recnum != "") )
window.location= address[recnum];
else
alert("\nYou must first select a radio button.");
}
// Deactivate Cloaking --> </script> <body bgcolor="#ffe4c4" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> <center><form name="leapto"> <table border=3><tr> <td align="center" bgcolor=000080> <input type="radio" name="buttons" value="1" onclick="dataBase(this.form)"> <font color=00ffff><b>Home Page</b></font></td> <td align="center" bgcolor=ff0000> <input type="radio" name="buttons" value="2" onclick="dataBase(this.form)"> <font color=000000><b>Contents</b></font></td> <td align="center" bgcolor=c0c0c0> <input type="radio" name="buttons" value="3" onclick="dataBase(this.form)"> <font color=800000><b>Navigation Aids</b></font></td> <td align="center" bgcolor=008080> <input type="radio" name="buttons" value="4" onclick="dataBase(this.form)"> <font color=ffff00><b>A Dropdown List</b></font></td></tr> </table> <br><br> <table border=0><tr> <td align="center" width=350> <textarea name="display" rows=6 cols=25 wrap=yes></textarea></td> <td align="center" width=150> <input type="button" value="Let's Go!" onclick="leapTo()"></td></tr> </table> </form> </center>
|
|
|
Post by handsomepredator on Jun 29, 2015 12:33:35 GMT
<script language="JavaScript"> <!-- Hide script from older browsers document.write('<P ALIGN="CENTER">') document.write("<FORM>") document.write('<INPUT TYPE = "BUTTON" VALUE = "<-- Go Back" onClick="window.history.go(-1);">') document.write("</FORM>") document.write("</P>") //--> </script>
|
|