PDA

View Full Version : Free JavaScript Code Downloads



JavaScriptBank
August 26th, 2009, 04:03
This JavaScript code is a hierarchical, object oriented navigator, open source menu. It can be easily displayed horizontally or vertically, and on several different levels.... detail (http://www.javascriptbank.com/vb-navigator.html/en//)


http://www.javascriptbank.com/javascript.images/menu/vb-navigator.jpg (http://www.javascriptbank.com/vb-navigator.html/en/)
Demo: VB Navigator (http://www.javascriptbank.com/javascript/menu/multilevel-menu/vb-navigator/preview/en/)

How to setup

Step 1: Use CSS code below for styling the script
CSS

<style>
/*
Created by: Vladimir Bodurov
Web Site: http://www.bodurov.com/menu/
*/
A.MenuLink{
color:#1D2123;
width:100%;
text-decoration: none;
}

/* Menu Link when the mouse is over */
A.MenuLink:hover{
color:#AA0000;
background-color:#FFFF99;
text-decoration: underline;
}

/* First menu link element */
DIV.FirstMenuElement{
font: 12px Geneva, Arial, Helvetica, sans-serif;
position:absolute;
padding:3px;
width:130px;
text-align: center;
background-color:#82A6C4;
border: solid #475156 1px;
display:none;
}

/* First menu link element when the mouse is over */
DIV.FirstMenuElementOver{
font: 12px Geneva, Arial, Helvetica, sans-serif;
position:absolute;
width:130px;
padding:3px;
text-align: center;
background-color:#FFFF99;
border: solid #475156 1px;
}

/* Menu link element */
DIV.MenuElement {
font: 12px Geneva, Arial, Helvetica, sans-serif;
position:absolute;
padding:3px;
width:150px;
background-color:#EFEFFF;
border: solid #475156 1px;
display:none;
}

/* Menu link element when the mouse is over */
DIV.MenuElementOver {
font: 12px Geneva, Arial, Helvetica, sans-serif;
position:absolute;
padding:3px;
width:150px;
background-color:#FFFF99;
border: solid #475156 1px;
}
</style>

Step 2: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<script language="JavaScript" type="text/javascript" src="vb_menu.js"></script>

Step 3: Place HTML below in your BODY section
HTML

<div id="MenuLine" style="position:relative;"></div>

<script language="JavaScript" src="theMenu.js"></script>

Step 4: Download files below
Files
menu_arrow.gif (http://www.javascriptbank.com/javascript/menu/VB_Navigator/menu_arrow.gif)
theMenu.js (http://www.javascriptbank.com/javascript/menu/VB_Navigator/theMenu.js)
vb_menu.js (http://www.javascriptbank.com/javascript/menu/VB_Navigator/vb_menu.js)

Dave B
August 27th, 2009, 19:45
Okay... what does it do?

JavaScriptBank
September 8th, 2009, 01:49
Provides you with full system/browser info in a nicely formatted table.... detail (http://www.javascriptbank.com/full-system-browser-info.html/en//)


http://www.javascriptbank.com/javascript.images/browser/full-system-browser-info.jpg (http://www.javascriptbank.com/full-system-browser-info.html/en/)
Demo: Full System/Browser Info (http://www.javascriptbank.com/javascript/browser/full-system-browser-info/preview/en/)

How to setup

Step 1: Copy & Paste HTML code below in your BODY section
HTML

<SCRIPT language=Javascript>
<!-- SCRIPT BY DANIEL ALLOWAY COPYRIGHT (C) DANIEL ALLOWAY, 2002 ALL RIGHTS RESERVED

// Browser Name
bn = navigator.appName;

// CPU Class
if(bn.toLowerCase() != "microsoft internet explorer")
cpu = "Don't Know";
else
cpu = navigator.cpuClass;

// Browser Version
if(bn.toLowerCase() == "microsoft internet explorer")
{
bv1 = navigator.appVersion.indexOf("MSIE") + 5;
bv2 = (bv1 + 3);
bv = navigator.appVersion.substring(bv1,bv2);
}

else if(bn.toLowerCase() == "opera")
{
bv1 = navigator.appVersion.indexOf("(") - 4;
bv2 = (bv1 + 3);
bv = navigator.appVersion.substring(bv1,bv2);
}

else if(bn.toLowerCase() == "netscape")
{
bv1 = navigator.appVersion.indexOf("(") - 5;
bv2 = (bv1 + 4);
bv = navigator.appVersion.substring(bv1,bv2);
}

// Application Code Name
bc = navigator.appCodeName;

// Browser Language
bl = navigator.browserLanguage;



// Operating System
if(bn.toLowerCase() == "microsoft internet explorer")
{
if(navigator.userAgent.indexOf('IRIX') != -1)
OpSys = "Irix";
else if((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('98') != -1))
OpSys = "Windows 98 or greater";
else if((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('95') != -1))
OpSys = "Windows 95";
else if(navigator.appVersion.indexOf("16") !=-1)
OpSys = "Windows 3.1";
else if (navigator.appVersion.indexOf("NT") !=-1)
OpSys= "Windows NT";
else if(navigator.appVersion.indexOf("SunOS") !=-1)
OpSys = "SunOS";
else if(navigator.appVersion.indexOf("Linux") !=-1)
OpSys = "Linux";
else if(navigator.userAgent.indexOf('Mac') != -1)
OpSys = "Macintosh";
else if(navigator.appName=="WebTV Internet Terminal")
OpSys="WebTV";
else if(navigator.appVersion.indexOf("HP") !=-1)
OpSys="HP-UX";
else
OpSys = "other";
}

else
{
OpSys = navigator.platform;
if(OpSys.toLowerCase() == "win32")
OpSys = "Windows";
else
OpSys = "Other";
}



// Java Detection
if(navigator.javaEnabled())
java = "Yes";
else
java = "No";

// Anti-alisaing Fonts
if(window.screen.fontSmoothingEnabled == true)
font = "Yes"
else
font = "No"

// Current Resolution
w = screen.width;
h = screen.height;
res = w + " x " + h;

// Max Resolution
mw = window.screen.availWidth;
mh = window.screen.availHeight;
mres = mw + " x " + mh;

// Color Depth (bit)
color = window.screen.colorDepth;

// Number Of Colors
ncolor = Math.pow(2, color);


// Write it all to the body
document.write("<table border='0' bgcolor='#476078' width='400' cellpadding='2' cellspacing='1'>");
document.write("<tr><td bgcolor='#1B2936' colspan='2' align='center'><small>Script by Daniel Alloway<br>");
document.write("<a href='http://h2osmash.tripod.com' target='_blank'>http://h2osmash.tripod.com</a></small></td></tr>");

document.write("<tr><td bgcolor='#223544'>CPU Class: </td>");
document.write("<td bgcolor='#444444'>", cpu ,"</td></tr>");

document.write("<tr><td bgcolor='#223544'>Operating System: </td>");
document.write("<td bgcolor='#444444'>", OpSys ,"</td></tr>");

document.write("<tr><td bgcolor='#223544'>Browser Name: </td>");
document.write("<td bgcolor='#444444'>", bn ,"</td></tr>");

document.write("<tr><td bgcolor='#223544'>Browser Version: </td>");
document.write("<td bgcolor='#444444'>", bv ,"</td></tr>");

document.write("<tr><td bgcolor='#223544'>Browser Language: </td>");
document.write("<td bgcolor='#444444'>", bl ,"</td></tr>");

document.write("<tr><td bgcolor='#223544'>Code Name: </td>");
document.write("<td bgcolor='#444444'>", bc ,"</td></tr>");

document.write("<tr><td bgcolor='#223544'>Java?: </td>");
document.write("<td bgcolor='#444444'>", java ,"</td></tr>");

document.write("<tr><td bgcolor='#223544'>Cookies?: </td>");

var oneDay= 1*24*60*60*1000;

var expDate = new Date();

expDate.setTime (expDate.getTime() + oneDay);

var cookieExpires = expDate.toGMTString();

document.cookie="verifyCookie=test; expires="+cookieExpires

if (document.cookie.length>0)

document.write("<td bgcolor='#444444'>Your browser supports cookies.</td>");

else {

document.write("<td bgcolor='#444444'>Your browser doesn't support cookies, or they're currently disabled.</td>");

document.write(document.cookie.substring(0,document.cookie.l ength)+"<BR><BR>");

}

document.cookie="verifyCookie=CLEAR; expires=Sun, 09-Nov-97 01:00:00 GMT";


document.write("<tr><td bgcolor='#223544'>Anti-aliasing Fonts: </td>");
document.write("<td bgcolor='#444444'>", font ,"</td></tr>");

document.write("<tr><td bgcolor='#223544'>Current Resolution: </td>");
document.write("<td bgcolor='#444444'>", res ,"</td></tr>");

document.write("<tr><td bgcolor='#223544'>Max Resolution: </td>");
document.write("<td bgcolor='#444444'>", mres ,"</td></tr>");

document.write("<tr><td bgcolor='#223544'>Color Depth: </td>");
document.write("<td bgcolor='#444444'>", color ," bit</td></tr>");

document.write("<tr><td bgcolor='#223544'># of Colors: </td>");
document.write("<td bgcolor='#444444'>", ncolor ,"</td></tr>");
//-->
</SCRIPT>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->

JavaScriptBank
September 14th, 2009, 08:59
On the Internet in general and JavaScript (http://www.javascriptbank.com/) in particular, there are many codes and tools to help your visitors copy text directly into the clipboard (http://www.javascriptbank.com/=clipboard) without th... detail (http://www.javascriptbank.com/copy-to-clipboard-using-flash.html/en//)


http://www.javascriptbank.com/javascript.images/form/copy-to-clipboard-using-flash.jpg (http://www.javascriptbank.com/copy-to-clipboard-using-flash.html/en/)
Demo: Copy to Clipboard using Flash (http://www.javascriptbank.com/javascript/form/copy-to-clipboard-using-flash/preview/en/)

How to setup

Step 1: Use JavaScript code below to setup the script
JavaScript

<script type="text/javascript">
<!--
/*
Created by: Mark O'Sullivan :: http://lussumo.com/
Jeff Larson :: http://www.jeffothy.com/
Mark Percival :: http://webchicanery.com/
Licensed under: GNU Lesser General Public License
*/

function copy(text2copy) {
if (window.clipboardData) {
window.clipboardData.setData("Text",text2copy);
} else {
var flashcopier = 'flashcopier';
if(!document.getElementById(flashcopier)) {
var divholder = document.createElement('div');
divholder.id = flashcopier;
document.body.appendChild(divholder);
}
document.getElementById(flashcopier).innerHTML = '';
var divinfo = '<embed src="_clipboard.swf" FlashVars="clipboard='+escape(text2copy)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
document.getElementById(flashcopier).innerHTML = divinfo;
}
}
//-->
</script>

Step 2: Place HTML below in your BODY section
HTML

<form name="form1" action="">
<textarea name="results" cols="40" rows="6">All
of the text here will be copied. Epsum factorial non deposit quid pro
quo hic escorol. Olypian quarrels et gorilla congolium sic ad nauseum.
Souvlaki ignitus carborundum.</textarea>
<br>
<input value="Copy This" onclick="copy(document.form1.results.value);" type="button">
</form>

Step 3: Download files below
Files
_clipboard.swf (http://www.javascriptbank.com/javascript/form/Copy_to_Clipboard_using_Flash/_clipboard.swf)







JavaScript Enlarge Image (http://www.javascriptbank.com/enlarge-image-2.html/en/) - JavaScript Fading Slide Show (http://www.javascriptbank.com/fading-slide-show.html) - JavaScript Rotating Image script (http://www.javascriptbank.com/rotating-image-script.html)

JavaScriptBank
September 21st, 2009, 06:43
Automatically opens a small popup window (http://www.javascriptbank.com/javascript/browser/popup/) and closes it after a specified time. Great for displaying important messages (http://www.javascriptbank.com/javascript/text/) without ... detail (http://www.javascriptbank.com/auto-popup-window.html/en//)


http://www.javascriptbank.com/javascript.images/browser/auto-popup-window.jpg (http://www.javascriptbank.com/auto-popup-window.html/en/)
Demo: Auto Popup Window (http://www.javascriptbank.com/javascript/browser/popup/auto-popup-window/preview/en/)

How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
<!-- Original: Rick Johnson (frj11@ev1.net) -->
<!-- Web Site: http://rickjohnson.tripod.com -->

function popupWin() {
text = "<html>\n<head>\n<title>Pop Window</title>\n<body>\n";
text += "<center>\n<br>";
text += "<a href='http://www.javascriptbank.com/' target='_blank'><h2>Over 2000+ free JavaScripts<br>at JavaScriptBank.com</h2></a>";
text += "</center>\n</body>\n</html>\n";
setTimeout('windowProp(text)', 3000); // delay 3 seconds before opening
}
function windowProp(text) {
newWindow = window.open('','newWin','width=300,height=100');
newWindow.document.write(text);
setTimeout('closeWin(newWindow)', 5000); // delay 5 seconds before closing
}
function closeWin(newWindow) {
newWindow.close(); // close small window and depart
}
// End -->
</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Place HTML below in your BODY section
HTML

<BODY onLoad="popupWin()">
</BODY>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








JavaScript Vertical Marquee (http://www.javascriptbank.com/vertical-marquee.html) - JavaScript DHTML analog clock (http://www.javascriptbank.com/dhtml-analog-clock-ii.html/en/) - JavaScript Backwards Text (http://www.javascriptbank.com/backwards-text-2-index.html)

JavaScriptBank
September 28th, 2009, 10:37
A simulator effect with Pacman game.... detail (http://www.javascriptbank.com/pacman-index.html/en//)


http://www.javascriptbank.com/javascript.images/mouse/pacman-index.jpg (http://www.javascriptbank.com/pacman-index.html/en/)
Demo: Pacman (http://www.javascriptbank.com/javascript/mouse/trailer/pacman-index/preview/en/)

How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<SCRIPT LANGUAGE = "Javascript1.2" >
ammount = 10;
times = 1;
wait = 0;
done = false;
x = new Array();
y = new Array();
temp = 0;
waitUntil = 10;

pillSrc = "Pill.gif";
pacCESrc = "PacCE.gif";
pacOESrc = "PacOE.gif";
pacCWSrc = "PacCW.gif";
pacOWSrc = "PacOW.gif";

for (i = 1; i <= ammount; i++)
document.write('<DIV ID = "pill' + i + '" STYLE = "visibility: hidden; position: absolute"><IMG NAME = "pic' + i + '" SRC = "' + pillSrc + '"></DIV>');

pillW = document.pic1.width;
pillH = document.pic1.height;

document.write('<DIV ID = "pacCE" STYLE = "visibility: hidden; position: absolute"><IMG NAME = "pac1E" SRC = "' + pacCESrc + '"></DIV>');
document.write('<DIV ID = "pacOE" STYLE = "visibility: hidden; position: absolute"><IMG NAME = "pac2E" SRC = "' + pacOESrc + '"></DIV>');
document.write('<DIV ID = "pacCW" STYLE = "visibility: hidden; position: absolute"><IMG NAME = "pac1W" SRC = "' + pacCWSrc + '"></DIV>');
document.write('<DIV ID = "pacOW" STYLE = "visibility: hidden; position: absolute"><IMG NAME = "pac2W" SRC = "' + pacOWSrc + '"></DIV>');

showPacC = document.getElementById("pacCE").style;
showPacO = document.getElementById("pacOE").style;

pacCWidth = document.pac1E.width;
pacCHeight = document.pac1E.height;
pacOWidth = document.pac2E.width;
pacOHeight = document.pac2E.height;

function pacPicC()
{
temp = place + 1;
if (temp > ammount)
temp = 1;
if (x[temp] >= x[place])
{
showPacC = document.getElementById("pacCE").style;
xOff = 10;
}
else
{
showPacC = document.getElementById("pacCW").style;
xOff = 23;
}
}

function pacPicO()
{
temp = place + 1;
if (temp > ammount)
temp = 1;
if (x[temp] >= x[place])
{
showPacO = document.getElementById("pacOE").style;
xOff = 10;
}
else
{
showPacO = document.getElementById("pacOW").style;
xOff = 23;
}
}

function update(e)
{
wait++;
if (wait == waitUntil)
{
if (times > ammount)
{
done = true;
times = 1;
}
showPill = document.getElementById("pill" + times + "").style;
x[times] = event.x + document.body.scrollLeft - (pillW / 2);
showPill.left = x[times];
y[times] = event.y + document.body.scrollTop - (pillH / 2);
showPill.top = y[times];
showPill.visibility = "visible";
if (done)
{
showPacC.visibility = "hidden";
place = times + 1;
if (place > ammount)
place = 1;
pacPicO();
showPacO.left = x[place] - pacOWidth + xOff;
showPacO.top = y[place] - (pacOHeight / 2) + 3;
showPacO.visibility = "visible";
}
times++;
wait = 0;
}
else if (wait == waitUntil / 2 && done)
{
showPacO.visibility = "hidden";
if (place > ammount)
place = 1;
pacPicC();
showPacC.left = x[place] - pacCWidth + xOff;
showPacC.top = y[place] - (pacCHeight / 2) + 3;
showPacC.visibility = "visible";
}
}
</SCRIPT>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Download files below
Files
Pacman_images.zip (http://javascriptbank.com/javascript/mouse/Pacman/Pacman_images.zip)







JavaScript Enlarge Image (http://www.javascriptbank.com/enlarge-image-2.html/en/) - JavaScript Fading Slide Show (http://www.javascriptbank.com/fading-slide-show.html) - JavaScript Rotating Image script (http://www.javascriptbank.com/rotating-image-script.html)

JavaScriptBank
October 5th, 2009, 11:07
Turn a form (http://www.javascriptbank.com/javascript/form/) select list into a two-level select menu.... detail (http://www.javascriptbank.com/select-menu-index.html/en//)


http://www.javascriptbank.com/javascript.images/form/select-menu-index.jpg (http://www.javascriptbank.com/select-menu-index.html/en/)
Demo: Select Menu (http://www.javascriptbank.com/javascript/form/dropdown/select-menu-index/preview/en/)

How to setup

Step 1: downloads
Files
sm.zip (http://javascriptbank.com/javascript/form/Select_Menu/sm.zip)







JavaScript Bookmark Page script (http://www.javascriptbank.com/bookmark-page-script.html) - JavaScript Color Wheel (http://www.javascriptbank.com/color-wheel.html) - JavaScript Image slideshow (http://www.javascriptbank.com/image-slideshow-transition.html)

JavaScriptBank
October 12th, 2009, 10:51
This JavaScript (http://www.javascriptbank.com/javascript/) displays a countdown timer (http://www.javascriptbank.com/javascript/time/clock-time-date/) and alerts the user when the timer reaches zero. It then redirects to another Web ... detail (http://www.javascriptbank.com/javascript-countdown-timer.html/en//)


http://www.javascriptbank.com/javascript.images/time/countdown-timer.jpg (http://www.javascriptbank.com/javascript-countdown-timer.html/en/)
Demo: JavaScript Countdown Timer (http://www.javascriptbank.com/javascript/time/counter/javascript-countdown-timer/preview/en/)

How to setup

Step 1: Use CSS code below for styling the script
CSS

<style type="text/css">
#txt {
border:none;
font-family:verdana;
font-size:16pt;
font-weight:bold;
border-right-color:#FFFFFF
}

</style>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Use JavaScript code below to setup the script
JavaScript

<script language="javascript">
// Created by: Neill Broderick :: http://www.bespoke-software-solutions.co.uk/downloads/downjs.php

var mins
var secs;

function cd() {
mins = 1 * m("10"); // change minutes here
secs = 0 + s(":01"); // change seconds here (always add an additional second to your total)
redo();
}

function m(obj) {
for(var i = 0; i < obj.length; i++) {
if(obj.substring(i, i + 1) == ":")
break;
}
return(obj.substring(0, i));
}

function s(obj) {
for(var i = 0; i < obj.length; i++) {
if(obj.substring(i, i + 1) == ":")
break;
}
return(obj.substring(i + 1, obj.length));
}

function dis(mins,secs) {
var disp;
if(mins <= 9) {
disp = " 0";
} else {
disp = " ";
}
disp += mins + ":";
if(secs <= 9) {
disp += "0" + secs;
} else {
disp += secs;
}
return(disp);
}

function redo() {
secs--;
if(secs == -1) {
secs = 59;
mins--;
}
document.cd.disp.value = dis(mins,secs); // setup additional displays here.
if((mins == 0) && (secs == 0)) {
window.alert("Time is up. Press OK to continue."); // change timeout message as required
// window.location = "yourpage.htm" // redirects to specified page once timer ends and ok button is pressed
} else {
cd = setTimeout("redo()",1000);
}
}

function init() {
cd();
}
window.onload = init;
</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 3: Place HTML below in your BODY section
HTML

<form name="cd">
<input id="txt" readonly="true" type="text" value="10:00" border="0" name="disp">
</form>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








AJAX news ticker (http://www.javascriptbank.com/rss-ajax-newsticker.html) - JavaScript Refresh Page (http://www.javascriptbank.com/refresh-page-automatic.html/en/) - JavaScript Unclosable Window (http://www.javascriptbank.com/blink.html)

JavaScriptBank
October 21st, 2009, 10:42
This JavaScript (http://www.javascriptbank.com/javascript/) creates slideshow effect with one of transitions.... detail (http://www.javascriptbank.com/image-slideshow-transition.html/en//)


http://www.javascriptbank.com/javascript.images/image/image-slideshow-transition.jpg (http://www.javascriptbank.com/javascript/image/slideshow/image-slideshow-transition/preview/en/)
Demo: Image slideshow transition (http://www.javascriptbank.com/image-slideshow-transition.html/en/)


How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<script LANGUAGE="JavaScript1.1">
<!-- Beginning of JavaScript -

messages = new Array()
//anh dung de tao hieu ung
messages[0] = "<img src=logojs.gif>"
messages[1] = "<img src=photo1.jpg>"
messages[2] = "<img src=photo2.jpg>"
messages[3] = "<img src=photo3.jpg>"
messages[4] = "<img src=photo4.jpg>"

var i_messages = 0
var timer

function dotransition() {
if (document.all) {
content.filters[0].apply()
content.innerHTML = messages[i_messages]
content.filters[0].play()
if (i_messages >= messages.length-1) {
i_messages = 0
}
else {
i_messages++
}
}

if (document.layers) {
document.nn.document.write("<table cellspacing=2 cellpadding=2 border=0><tr><td align=left>"+messages[i_messages]+"</td></tr></table>")
document.close()
if (i_messages >= messages.length-1) {
i_messages = 0
}
else {
i_messages++
}
}
timer = setTimeout("dotransition()",5000)
}
// - End of JavaScript - -->
</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Place HTML below in your BODY section
HTML

<BODY onload="dotransition()">
<DIV id=content style="position: relative; width:160px; height:240px; text-align:center; filter: revealTrans(Transition=12, Duration=3)"></DIV>
</BODY>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








AJAX news ticker (http://www.javascriptbank.com/rss-ajax-newsticker.html) - JavaScript Refresh Page (http://www.javascriptbank.com/refresh-page-automatic.html/en/) - JavaScript Unclosable Window (http://www.javascriptbank.com/blink.html)

JavaScriptBank
October 25th, 2009, 23:07
Bring the sound of life - music to your visitors by this JavaScript. It is an advanced web based midi player that actually enables you to jump, pause, and manipulate the play list like never before.... detail (http://www.javascriptbank.com/web-based-music-player.html/en//)


http://www.javascriptbank.com/javascript.images/multimedia/web-based-music-player.jpg (http://www.javascriptbank.com/javascript/multimedia/sound/web-based-music-player/preview/en/)
Demo: Web based Music Player (http://www.javascriptbank.com/web-based-music-player.html/en/)


How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<SCRIPT language=JavaScript>
<!-- Begin
counter = 0;
html = true;
songs = new Array();
function addsong() {
file = document.forms[0].file.value;
if(file == "") {
alert("Entra un nombre de archivo o da click en Examinar..");
}
else {
fn = file;
while(fn.indexOf() != -1) {
pos = fn.indexOf();
fn = fn.substring(fn.lenght);
}
if(fn.indexOf(".gif") == 1) {
alert("Sólo sonidos o música");
}
else {
songs[counter] = file;
document.forms[0].selMusica[counter] = new Option(fn, file, false, true);
counter++;
}
document.forms[0].file.value = "";
}
}
function musica() {
document.all.sound.src=document.clock.selMusica.options[document.clock.selMusica.selectedIndex].text;
}
function stop() {
document.all.sound.src="";
}
function count() {
document.clock.songs.value=document.clock.selMusica.options. length;
}
function deletethis() {
if(counter > 0) {
counter--;
document.forms[0].selMusica[counter] = null;
songs[counter] = "";
}
else {
alert("No hay nada en la lista!");
}
}
function bajar() {
document.clock.selMusica.options[document.clock.selMusica.selectedIndex++];
saber2();
saber();
}
function subir() {
document.clock.selMusica.options[document.clock.selMusica.selectedIndex--];
saber2();
saber();
}
function saber() {
document.clock.url.value=document.clock.selMusica.options[document.clock.selMusica.selectedIndex].text;
}
function saber2() {
fn = document.clock.selMusica.options[document.clock.selMusica.selectedIndex].text;
char = unescape("%5C");
while(fn.indexOf(char) != -1) {
pos = fn.indexOf(char);
fn = fn.substring(pos + 1, fn.length);
document.clock.nombre.value=fn;
}
}
// End-->
</SCRIPT>

Step 2: Place HTML below in your BODY section
HTML

<BODY onclick=count() onload=count()>
<BGSOUND id=sound src="">
<FORM name=clock><INPUT type=file name=file size="20"> <INPUT onclick=addsong() type=button value=Add><INPUT onclick=deletethis() type=button value=Delete><BR><INPUT onclick=musica() type=button value=Listen name=empezar>
<INPUT onclick=stop() type=button value=Stop name=detener> You have:<INPUT
readOnly size=2 name=songs>song(s) in the list.<BR>Name of the song:<INPUT
size=25 name=nombre><INPUT onclick="saber2(); saber()" type=button value="Know Name & Url">Url
of the song:<INPUT size=19 name=url> <BR><INPUT onclick=bajar() type=button value=MoveDown><INPUT onclick=subir() type=button value=MoveUp><BR><BR><SELECT
multiple size=20 name=selMusica></SELECT> </FORM>
</BODY>







JavaScript Line Graph script (http://www.javascriptbank.com/line-graph-script-index.html) - JavaScript Virtual Keyboard (http://www.javascriptbank.com/virtualkeyboard-index.html) - JavaScript Horizontal Slider (http://www.javascriptbank.com/horizontal-slider-javascript-v2-2.html)

JavaScriptBank
November 1st, 2009, 19:51
Use this simple JavaScript (http://www.javascriptbank.com/javascript/) to make all links (http://www.javascriptbank.com/javascript/link/) on your web pages open in new tab/window. Script is easy to setup, you should save them into a f... detail (http://www.javascriptbank.com/make-link-open-in-new-tab-window.html/en//)


http://www.javascriptbank.com/javascript.images/link/make-link-open-in-new-tab-window.jpg (http://www.javascriptbank.com/javascript/link/make-link-open-in-new-tab-window/preview/en/)
Demo: Make link open in new tab/window (http://www.javascriptbank.com/make-link-open-in-new-tab-window.html/en/)


How to setup

Step 1: Use JavaScript code below to setup the script
JavaScript

<script language=javascript>
/*
Kevin Yank
http://www.sitepoint.com/authorcontact/48
*/
function externalLinks()
{
if (!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++)
{
var anchor = anchors[i];
if(anchor.getAttribute("href"))
anchor.target = "_blank";
}
}
window.onload = externalLinks;

</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Copy & Paste HTML code below in your BODY section
HTML

<a href="http://javascriptbank.com/">Home</a> |
<a href="http://javascriptbank.com/4rum/">Forum</a> |
<a href="http://javascriptbank.com/javascript/">JavaScript</a> |
<a href="http://javascriptbank.com/service/">Services</a> |
<a href="http://javascriptbank.com/javascript/submit-javascript-bank.html">Submit script</a> |
<a href="http://javascriptbank.com/thietkeweb/javascriptmall/">Documentary</a> |
<a href="http://javascriptbank.com/javascript/contact-javascript-bank.html">Contact us</a> |
<a href="http://javascriptbank.com/javascript/aboutus-javascript-bank.html">About us</a>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








AJAX news ticker (http://www.javascriptbank.com/rss-ajax-newsticker.html) - JavaScript Refresh Page (http://www.javascriptbank.com/refresh-page-automatic.html/en/) - JavaScript Unclosable Window (http://www.javascriptbank.com/blink.html)

JavaScriptBank
November 9th, 2009, 11:42
AJAX - a very great web development technology nowaday. Use this AJAX (http://www.javascriptbank.com/javascript/ajax/) in order to load XML and HTML files on the same website with XMLHttpRequest. And in the <code>body... detail (http://www.javascriptbank.com/ajax-page-content-loader.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/ajax/ajax-page-content-loader.jpg (http://www.javascriptbank.com/javascript/ajax/ajax-page-content-loader/preview/en/)
Demo: AJAX Page Content Loader (http://www.javascriptbank.com/ajax-page-content-loader.html/en/)


How to setup

Step 1: Place CSS below in your HEAD section
CSS

<style type="text/css">
<!--
#contentLYR {
position:relative;/*
width:200px;
height:115px;
left: 200px;
top: 200px;*/
z-index:1;
}
-->
</style>

Step 2: Place JavaScript below in your HEAD section
JavaScript

<script type="text/javascript">
<!-- Begin
/*
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
*/

// Created by: Eddie Traversa (2005) :: http://dhtmlnirvana.com/
function ajaxLoader(url,id) {
if (document.getElementById) {
var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
}
if (x) {
x.onreadystatechange = function() {
if (x.readyState == 4 && x.status == 200) {
el = document.getElementById(id);
el.innerHTML = '<JavaScriptBank>This is content of demo.xml file</JavaScriptBank>';//x.responseText;
}
}
x.open("GET", url, true);
x.send(null);
}
}
//-->
</script>

Step 3: Place HTML below in your BODY section
HTML

<div id="contentLYR"></div>
<script>window.onload = function(){ajaxLoader('demo.xml','contentLYR');}</script>

Step 4: Download files below
Files
demo.xml (http://www.javascriptbank.com/javascript/ajax/AJAX_Page_Content_Loader/demo.xml)







JavaScript Bookmark Page script (http://www.javascriptbank.com/bookmark-page-script.html) - JavaScript Color Wheel (http://www.javascriptbank.com/color-wheel.html) - JavaScript Image slideshow (http://www.javascriptbank.com/image-slideshow-transition.html)

JavaScriptBank
November 16th, 2009, 01:50
JavaScript - an indispensable part for developing websites and web pages, whether that is simple pages or professional website, and whether you are senior or junior. Nowadays, JavaScript frameworks be... detail (http://www.javascriptbank.com/top-10-javascript-frameworks-by-google--yahoo--bing.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/article/top-10-javascript-frameworks-by-google--yahoo--bing.jpg (http://www.javascriptbank.com/javascript/article/top-10-javascript-frameworks-by-google--yahoo--bing/preview/en/)
Demo: Top 10 JavaScript Frameworks by Google, Yahoo, Bing (http://www.javascriptbank.com/top-10-javascript-frameworks-by-google--yahoo--bing.html/en/)


How to setup







Javascript Music Player (http://www.javascriptbank.com/web-based-music-player.html/en/) - Random Text Generator (http://www.javascriptbank.com/random-text-generator.html) - Floating Image Script (http://www.javascriptbank.com/up-down-floating-image.html)

JavaScriptBank
November 19th, 2009, 21:25
This JavaScript code - date picker (http://www.javascriptbank.com/=date picker) helps you choose a time through a popup window (http://www.javascriptbank.com/javascript/browser/popup/). Perhaps this feature is not new on J... detail (http://www.javascriptbank.com/) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/time/time-picker-with-child-window.jpg (http://www.javascriptbank.com/javascript/time/clock-time-date/time-picker-with-child-window/preview/en/)
Demo: Time Picker with child window (http://www.javascriptbank.com/time-picker-with-child-window.html/en/)


[U]How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<script language="JavaScript" type="text/javascript" src="timePicker.js">
/*
Bassem R. Zohdy | bassem.zohdy@gmail.com
*/
</script>

Step 2: Place HTML below in your BODY section
HTML

<form name="form1">
<input id="field" onkeydown="time(this.id)"/>
</form>

Step 3: must download files below
Files
down.jpg (http://www.javascriptbank.com/javascript/time/Time_Picker_with_child_window/down.jpg)
time.html (http://www.javascriptbank.com/javascript/time/Time_Picker_with_child_window/time.html)
timePicker.js (http://www.javascriptbank.com/javascript/time/Time_Picker_with_child_window/timePicker.js)
up.jpg (http://www.javascriptbank.com/javascript/time/Time_Picker_with_child_window/up.jpg)







JavaScript Make link open in new tab/window (http://www.javascriptbank.com/make-link-open-in-new-tab-window.html/en/) - JavaScript World clock (http://www.javascriptbank.com/world-clock-with-unique-display.html/en/) - circumference calculator (http://www.javascriptbank.com/circumference-calculator.html/en/)

JavaScriptBank
November 22nd, 2009, 21:55
Displays images continuously in a slideshow presentation format, with a fade effect on image (http://www.javascriptbank.com/javascript/image/) transitions. (Fade in Internet Explorer 4+ only).... detail (http://www.javascriptbank.com/fading-slide-show.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/image/fading-slide-show.jpg (http://www.javascriptbank.com/javascript/image/slideshow/fading-slide-show/preview/en/)
Demo: Fading Slide Show (http://www.javascriptbank.com/fading-slide-show.html/en/)


How to setup

Step 1: Use JavaScript code below to setup the script
JavaScript

<script>
/*
Original: CodeLifter.com (support@codelifter.com)
Web Site: http://www.codelifter.com
*/

// set the following variables
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000

// Duration of crossfade (seconds)
var crossFadeDuration = 3

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = 'logojs.gif'
Pic[1] = 'photo3.jpg'
Pic[2] = 'logojs.gif'
Pic[3] = 'photo5.jpg'
Pic[4] = 'photo2.jpg'

// do not edit anything below this line

var t
var j = 0
var p = Pic.length
var preLoad = new Array()
for (i = 0; i < p; i++){
preLoad[i] = new Image()
preLoad[i].src = Pic[i]
}

function runSlideShow(){
if (document.all){
document.images.SlideShow.style.filter="blendTrans(duration=2)"
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
document.images.SlideShow.filters.blendTrans.Apply()
}
document.images.SlideShow.src = preLoad[j].src
if (document.all){
document.images.SlideShow.filters.blendTrans.Play()
}
j = j + 1
if (j > (p-1)) j=0
t = setTimeout('runSlideShow()', slideShowSpeed)
}
</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Copy & Paste HTML code below in your BODY section
HTML

<body onLoad="runSlideShow()">
<img id="VU" src="logojs.gif" name='SlideShow'>
</body>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








JavaScript Line Graph script (http://www.javascriptbank.com/line-graph-script-index.html) - JavaScript Virtual Keyboard (http://www.javascriptbank.com/virtualkeyboard-index.html) - JavaScript Horizontal Slider (http://www.javascriptbank.com/horizontal-slider-javascript-v2-2.html)

JavaScriptBank
November 29th, 2009, 21:01
This JavaScript (http://www.javascriptbank.com/javascript/) integrates complete virtual keyboard solution to the any web page. It does support mouse input, as well as keyboard input translation. Plain text and rich te... detail (http://www.javascriptbank.com/virtualkeyboard-index.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/utility/virtualkeyboard-index.jpg (http://www.javascriptbank.com/javascript/utility/virtualkeyboard-index/preview/en/)
Demo: Virtual Keyboard (http://www.javascriptbank.com/virtualkeyboard-index.html/en/)


How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<script type="text/javascript" src="vk_loader.js" ></script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Copy & Paste HTML code below in your BODY section
HTML

<form action="no.cgi" method="get">
<div>
Subject:<br />

<input name="testa" id="testa" type="text" onfocus="VirtualKeyboard.attachInput(this)" /><br />
Password (has keyboard animation disabled):<br />
<input name="test_pwd" id="test_pwd" type="password" class="VK_no_animate" onfocus="VirtualKeyboard.attachInput(this)" /><br />
Text:<br />
<textarea name="testb" id="testb" type="text" cols="55" rows="10" wrap="soft" onfocus="VirtualKeyboard.attachInput(this)"></textarea>
<br />
<br />

<div id="td"></div>
<br />
<input id="showkb" type="button" value="Keyboard" onclick="VirtualKeyboard.toggle('testb','td'); return false;" />
</div>
<div id="dbg">
</div>
</form>
<script type="text/javascript">
EM.addEventListener(window,'domload',function(){
/*
* open the keyboard
*/
VirtualKeyboard.toggle('testb','td');
var el = document.getElementById('sul')
,lt = VirtualKeyboard.getLayouts()
,dl = window.location.href.replace(/[?#].+/,"")
for (var i=0,lL=lt.length; i<lL; i++) {
var cl = lt[i];
cl = cl[0]+" "+cl[1];
lt[i] = "<a href=\""+dl+"?vk_layout="+cl+"\" onclick=\"VirtualKeyboard.switchLayout(this.title);return false;\" title=\""+cl+"\" alt=\""+cl+"\" >"+cl+"</a>"
}
el.innerHTML += "<li>"+lt.join("</li><li>")+"</li>";
});
</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 3: downloads
Files
Virtual_Keyboard.zip (http://javascriptbank.com/javascript/utility/VirtualKeyboard/Virtual_Keyboard.zip)







Javascript Music Player (http://www.javascriptbank.com/web-based-music-player.html/en/) - Random Text Generator (http://www.javascriptbank.com/random-text-generator.html) - Floating Image Script (http://www.javascriptbank.com/up-down-floating-image.html)

JavaScriptBank
December 3rd, 2009, 00:22
Keep your content fresh. Use this JavaScript (http://www.javascriptbank.com/javascript/) to automatically reload a fresh copy of your Web page from the server. You determine the time (http://www.javascriptbank.com/javascript/time/) de... detail (http://www.javascriptbank.com/refresh-page-automatic.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/browser/refresh-page-automatic.jpg (http://www.javascriptbank.com/javascript/browser/window/refresh-page-automatic/preview/en/)
Demo: Refresh Page - Automatic (http://www.javascriptbank.com/refresh-page-automatic.html/en/)


How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<script type="text/javascript">
<!-- Begin
// Created by: Lee Underwood
function reFresh() {
window.open(location.reload(true))
}
/* Set the number below to the amount of delay, in milliseconds,
you want between page reloads: 1 minute = 60000 milliseconds. */
window.setInterval("reFresh()",300000);
// End -->
</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








JavaScript Bookmark Page script (http://www.javascriptbank.com/bookmark-page-script.html) - JavaScript Color Wheel (http://www.javascriptbank.com/color-wheel.html) - JavaScript Image slideshow (http://www.javascriptbank.com/image-slideshow-transition.html)

JavaScriptBank
December 7th, 2009, 22:16
This JavaScript (http://www.javascriptbank.com/javascript/) verifies that a string looks like a real e-mail (http://www.javascriptbank.com/javascript/email/) address.... detail (http://www.javascriptbank.com/validate-e-mail.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/email/validate-e-mail.jpg (http://www.javascriptbank.com/javascript/email/validate-e-mail/preview/en/)
Demo: JavaScript Validate E-Mail (http://www.javascriptbank.com/validate-e-mail.html/en/)


How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript

<script language="javascript">
// Created by: Francis Cocharrua :: http://scripts.franciscocharrua.com/

function Validate_String(string, return_invalid_chars) {
valid_chars = '1234567890-_.^~abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
invalid_chars = '';
if(string == null || string == '')
return(true);

//For every character on the string.
for(index = 0; index < string.length; index++) {
char = string.substr(index, 1);

//Is it a valid character?
if(valid_chars.indexOf(char) == -1) {
//If not, is it already on the list of invalid characters?
if(invalid_chars.indexOf(char) == -1) {
//If it's not, add it.
if(invalid_chars == '')
invalid_chars += char;
else
invalid_chars += ', ' + char;
}
}
}

//If the string does not contain invalid characters, the function will return true.
//If it does, it will either return false or a list of the invalid characters used
//in the string, depending on the value of the second parameter.
if(return_invalid_chars == true && invalid_chars != '') {
last_comma = invalid_chars.lastIndexOf(',');
if(last_comma != -1)
invalid_chars = invalid_chars.substr(0, $last_comma) +
' and ' + invalid_chars.substr(last_comma + 1, invalid_chars.length);
return(invalid_chars);
}
else
return(invalid_chars == '');
}


function Validate_Email_Address(email_address){
// Modified and tested by Thai Cao Phong, JavaScriptBank.com
//Assumes that valid email addresses consist of user_name@domain.tld

at = email_address.indexOf('@');
dot = email_address.indexOf('.');

if(at == -1 ||
dot == -1 ||
dot <= at + 1 ||
dot == 0 ||
dot == email_address.length - 1)
{
alert("Invalid email");
return(false);
}

user_name = email_address.substr(0, at);
domain_name = email_address.substr(at + 1, email_address.length);

if(Validate_String(user_name) === false || Validate_String(domain_name) === false)
{
alert("Invalid email");
return(false);
}

alert("Valid email");//return(true);
}
</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Place HTML below in your BODY section
HTML

<form name=f>
<input type=text name=mail value="">
<input type=button value=Check onclick="Validate_Email_Address(document.f.mail.value)">
</form>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








JavaScript Enlarge Image (http://www.javascriptbank.com/enlarge-image-2.html/en/) - JavaScript Fading Slide Show (http://www.javascriptbank.com/fading-slide-show.html) - JavaScript Rotating Image script (http://www.javascriptbank.com/rotating-image-script.html)

JavaScriptBank
December 9th, 2009, 21:27
Only a fews of days then Christmas will come. And if you are looking for one beautiful countdown timer for waiting <i>Christmas Day</i> on your website, then I hope this post will satisfy your needs; ... detail (http://www.javascriptbank.com/top-10-beautiful-christmas-countdown-timers.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/article/top-10-beautiful-christmas-countdown-timers.jpg (http://www.javascriptbank.com/javascript/article/top-10-beautiful-christmas-countdown-timers/preview/en/)
Demo: JavaScript Top 10 Beautiful Christmas Countdown Timers (http://www.javascriptbank.com/top-10-beautiful-christmas-countdown-timers.html/en/)


How to setup







Command to print web page in javascript (http://www.javascriptbank.com/window-print-method.html) - Javascript Time Picker (http://www.javascriptbank.com/time-picker-with-child-window.html) - JavaScript Go To URL Box (http://www.javascriptbank.com/go-to-url.html)

JavaScriptBank
December 13th, 2009, 20:33
This is a purely DHTML/ CSS (http://www.javascriptbank.com/javascript/css/) based Line Graph script. It loads fast and blends in with the rest of the page. You can even use a transparent detail (http://www.javascriptbank.com/javascript/backgroun... http://www.javascriptbank.com/javascript.images/graphic/line-graph-script-index.jpg (http://www.javascriptbank.com/javascript/graphic/line-graph-script-index/preview/en/)
Demo: JavaScript Line Graph script (http://www.javascriptbank.com/line-graph-script-index.html/en/)
[/CENTER]

[U]How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<script type="text/javascript" src="wz_jsgraphics.js"></script>
<script type="text/javascript" src="line.js"></script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Copy & Paste HTML code below in your BODY section
HTML

<div id="lineCanvas" style="overflow: auto; position:relative;height:300px;width:400px;"></div>

<script type="text/javascript">
var g = new line_graph();
g.add('1', 145);
g.add('2', 0);
g.add('3', 175);
g.add('4', 130);
g.add('5', 150);
g.add('6', 175);
g.add('7', 205);
g.add('8', 125);
g.add('9', 125);
g.add('10', 135);
g.add('11', 125);

g.render("lineCanvas", "Line Graph");
</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 3: downloads
Files
line.js (http://javascriptbank.com/javascript/graphic/Line_Graph_script/line.js)
wz_jsgraphics.js (http://javascriptbank.com/javascript/graphic/Line_Graph_script/wz_jsgraphics.js)







JavaScript Countdown Timer (http://www.javascriptbank.com/javascript-countdown-timer.html/en/) - JavaScript Currency Format (http://www.javascriptbank.com/currency-format-script.html) - JavaScript Format Phone Number (http://www.javascriptbank.com/format-phone-number.html)

JavaScriptBank
December 16th, 2009, 20:43
Decorate your webpage with this great animated document effect! Watch as snow fall gently trickles down the page, then disappear. The image of snow flakes used is changeable, so snow definitely isn't ... detail (http://www.javascriptbank.com/falling-snowflakes-with-images.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/multimedia/falling-snowflakes-with-images.jpg (http://www.javascriptbank.com/javascript/multimedia/events/falling-snowflakes-with-images/preview/en/)
Demo: JavaScript Falling Snowflakes with images (http://www.javascriptbank.com/falling-snowflakes-with-images.html/en/)


How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript

<script type="text/javascript">

/******************************************
* Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html)
******************************************/

//Configure below to change URL path to the snow image
var snowsrc="snow3.gif"
// Configure below to change number of snow to render
var no = 10;
// Configure whether snow should disappear after x seconds (0=never):
var hidesnowtime = 0;
// Configure how much snow should drop down before fading ("windowheight" or "pageheight")
var snowdistance = "pageheight";

///////////Stop Config//////////////////////////////////

var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

var dx, xp, yp; // coordinate and position variables
var am, stx, sty; // amplitude and step variables
var i, doc_width = 800, doc_height = 600;

if (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = iecompattest().clientWidth;
doc_height = iecompattest().clientHeight;
}

dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "snow.gif" : snowsrc
for (i = 0; i < no; ++ i) {
dx[i] = 0; // set coordinate variables
xp[i] = Math.random()*(doc_width-50); // set position variables
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20; // set amplitude variables
stx[i] = 0.02 + Math.random()/10; // set step variables
sty[i] = 0.7 + Math.random(); // set step variables
if (ie4up||ns6up) {
if (i == 0) {
document.write("<div id="dot"+ i +"" style="POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;"><a href="http://dynamicdrive.com"><img src='"+snowsrc+"' border="0"></a></div>");
} else {
document.write("<div id="dot"+ i +"" style="POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;"><img src='"+snowsrc+"' border="0"></div>");
}
}
}

function snowIE_NS6() { // IE and NS6 main animation function
doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")? iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight;
for (i = 0; i < no; ++ i) { // iterate for every dot
yp[i] += sty[i];
if (yp[i] > doc_height-50) {
xp[i] = Math.random()*(doc_width-am[i]-30);
yp[i] = 0;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
}
dx[i] += stx[i];
document.getElementById("dot"+i).style.top=yp[i]+"px";
document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";
}
snowtimer=setTimeout("snowIE_NS6()", 10);
}

function hidesnow(){
if (window.snowtimer) clearTimeout(snowtimer)
for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"
}


if (ie4up||ns6up){
snowIE_NS6();
if (hidesnowtime>0)
setTimeout("hidesnow()", hidesnowtime*1000)
}

</script>

Step 2: downloads
Files
snow3.gif (http://www.javascriptbank.com/javascript/multimedia/Falling_Snowflakes_with_images/snow3.gif)







Javascript Music Player (http://www.javascriptbank.com/web-based-music-player.html/en/) - Random Text Generator (http://www.javascriptbank.com/random-text-generator.html) - Floating Image Script (http://www.javascriptbank.com/up-down-floating-image.html)

~Edy
December 17th, 2009, 03:05
Nice, but I think a simple link to JSB would have been enough. :P

Dynash
December 17th, 2009, 08:29
Ugh, remove that "Clickzor", it's damaging your hyperlinks.

JavaScriptBank
December 19th, 2009, 11:49
In the environment of Internet in any country, beside the web promotion - one of Internet marketing UK (http://www.mediabug.com/) aspects; if a company or a website want to success; it nee... detail (http://www.javascriptbank.com/40-super-nice-javascript-extensions-and-plugins.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/article/40-super-nice-javascript-extensions-and-plugins.jpg (http://www.javascriptbank.com/javascript/article/40-super-nice-javascript-extensions-and-plugins/preview/en/)
Demo: JavaScript 40 Super Nice JavaScript Extensions and Plugins (http://www.javascriptbank.com/40-super-nice-javascript-extensions-and-plugins.html/en/)


How to setup







JavaScript Make link open in new tab/window (http://www.javascriptbank.com/make-link-open-in-new-tab-window.html/en/) - JavaScript World clock (http://www.javascriptbank.com/world-clock-with-unique-display.html/en/) - circumference calculator (http://www.javascriptbank.com/circumference-calculator.html/en/)

~Edy
December 19th, 2009, 12:34
So... how to setup?

JavaScriptBank
December 23rd, 2009, 20:35
World clock (http://www.javascriptbank.com/javascript/time/clock-time-date/) script with unusual design. Cross-browser (IE4 contains additional visual effects). World clock<... detail (http://www.javascriptbank.com/javascript/time/clock-time-date/) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/time/world-clock-with-unique-display.jpg (http://www.javascriptbank.com/javascript/time/clock-time-date/world-clock-with-unique-display/preview/en/)
Demo: JavaScript World clock with unique display (http://www.javascriptbank.com/world-clock-with-unique-display.html/en/)


[U]How to setup

Step 1: Copy & Paste CSS code below in your HEAD section
CSS

<STYLE>
.topcoverlay {
BACKGROUND-COLOR: #ffffff; FILTER: alpha(opacity=85); HEIGHT: 240px; LEFT: 0px; POSITION: absolute; TOP: 0px; WIDTH: 1000px
}
.bottomcoverlay {
BACKGROUND-COLOR: #ffffff; FILTER: alpha(opacity=85); HEIGHT: 1000px; LEFT: 0px; POSITION: absolute; TOP: 253px; WIDTH: 1000px
}
</STYLE>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<SCRIPT language=JavaScript>
<!-- Beginning of JavaScript -


var startpos=240
var bildhoehe=720
var step=3
var makepause=200
var difference=0
var local=1
var timer

function showtimelocal() {
if (local==1) {
var thistime= new Date()
var seconds=thistime.getSeconds()
var minutes=thistime.getMinutes()
var hours=thistime.getHours()
if (hours>=24) {hours=hours-24}
var secondspos=Math.floor(bildhoehe/60*seconds)
var minutespos=Math.floor(bildhoehe/60*minutes)
var hourspos=Math.floor(bildhoehe/60*hours)

if(document.all) {
document.all.secondsdiv.style.posTop=startpos-secondspos
document.all.minutesdiv.style.posTop=startpos-minutespos
document.all.hoursdiv.style.posTop=startpos-hourspos
}

if(document.layers) {
document.secondsdiv.top=startpos-secondspos
document.minutesdiv.top=startpos-minutespos
document.hoursdiv.top=startpos-hourspos
}
var timer=setTimeout("showtimelocal()",makepause)
}
else {
clearTimeout(timer)
}
}

function preUTC(thisdifference) {
clearTimeout(timer)
difference=eval(thisdifference)
local=0
showtimeUTC()
}

function inititate() {
if (document.layers) {
document.markernetscape1.visibility="VISIBLE"
document.markernetscape2.visibility="VISIBLE"
}
showtimelocal()
}

function prelocal() {
if (document.layers) {document.markernetscape.visibility="VISIBLE"}
clearTimeout(timer)
local=1
showtimelocal()
}

function showtimeUTC() {
if (local==0) {
var thistime= new Date()
var seconds=thistime.getSeconds()
var minutes=thistime.getMinutes()
var hours=thistime.getUTCHours()
hours+=difference
if (hours>=24) {hours=hours-24}
var secondspos=Math.floor(bildhoehe/60*seconds)
var minutespos=Math.floor(bildhoehe/60*minutes)
var hourspos=Math.floor(bildhoehe/60*hours)

if(document.all) {
document.all.secondsdiv.style.posTop=startpos-secondspos
document.all.minutesdiv.style.posTop=startpos-minutespos
document.all.hoursdiv.style.posTop=startpos-hourspos
}

if(document.layers) {
document.secondsdiv.top=startpos-secondspos
document.minutesdiv.top=startpos-minutespos
document.hoursdiv.top=startpos-hourspos
}
var timer=setTimeout("showtimeUTC()",makepause)
}
else {
clearTimeout(timer)
}
}

window.onload=inititate
// - End of JavaScript - -->
</SCRIPT>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 3: Place HTML below in your BODY section
HTML

<DIV id=secondsdiv style="LEFT: 200px; POSITION: absolute; TOP: 240px">
<IMG
src="rotaclock2930.gif" width="14" height="720"></DIV>
<DIV id=minutesdiv style="LEFT: 180px; POSITION: absolute">
<IMG
src="rotaclock2930.gif" width="14" height="720"></DIV>
<DIV id=hoursdiv style="LEFT: 160px; POSITION: absolute; TOP: 240px">
<IMG
src="rotaclock2930.gif" width="14" height="720"></DIV>
<DIV class=topcoverlay id=topcover></DIV>
<DIV class=bottomcoverlay id=bottomcover></DIV>
<DIV id=limiter1
style="COLOR: #ff0000; FONT-FAMILY: Arial; FONT-SIZE: 8pt; FONT-WEIGHT: bold; LEFT: 176px; POSITION: absolute; TOP: 241px">
:</DIV>
<DIV id=limiter2
style="COLOR: #ff0000; FONT-FAMILY: Arial; FONT-SIZE: 8pt; FONT-WEIGHT: bold; LEFT: 196px; POSITION: absolute; TOP: 241px">
:</DIV>
<DIV id=markernetscape1
style="COLOR: #ff0000; FONT-FAMILY: Arial; FONT-SIZE: 12pt; FONT-WEIGHT: bold; LEFT: 122px; POSITION: absolute; TOP: 248px; VISIBILITY: hidden"><IMG
height=1 src="line2930.gif" width=20></DIV>
<DIV id=markernetscape2
style="COLOR: #ff0000; FONT-FAMILY: Arial; FONT-SIZE: 12pt; FONT-WEIGHT: bold; LEFT: 230px; POSITION: absolute; TOP: 248px; VISIBILITY: hidden"><IMG
height=1 src="js 46_files/line2930.gif" width=20></DIV>
<DIV id=timezones
style="COLOR: #ff0000; FONT-FAMILY: Arial; FONT-SIZE: 8pt; LEFT: 10px; POSITION: absolute; TOP: 5px"><A
href="#"
onmouseover=prelocal()>&gt;&gt; local time</A><BR><A
href="#"
onmouseover="preUTC('-8')">Anchorage</A><BR><A
href="#"
onmouseover="preUTC('-11')">Auckland</A><BR><A
href="#"
onmouseover="preUTC('3')">Baghdad</A><BR><A
href="#"
onmouseover="preUTC('8')">Bejing</A><BR><A
href="#"
onmouseover="preUTC('-3')">Buenos Aires</A><BR><A
href="#"
onmouseover="preUTC('-6')">Denver</A><BR><A
href="#"
onmouseover="preUTC('8')">Hongkong</A><BR><A
href="#"
onmouseover="preUTC('-9')">Honolulu</A><BR><A
href="#"
onmouseover="preUTC('8')">Jakarta</A><BR><A
href="#"
onmouseover="preUTC('2')">Johannesburg</A><BR><A
href="#"
onmouseover="preUTC('2')">Kairo</A><BR><A
href="#"
onmouseover="preUTC('-5')">Lima</A><BR><A
href="#"
onmouseover="preUTC('1')">London</A><BR><A
href="#"
onmouseover="preUTC('-7')">Los Angeles</A><BR><A
href="#"
onmouseover="preUTC('4')">Moscow</A><BR><A
href="#"
onmouseover="preUTC('3')">Nairobi</A><BR><A
href="#"
onmouseover="preUTC('-4')">New York</A><BR><A
href="#"
onmouseover="preUTC('2')">Paris</A><BR><A
href="#"
onmouseover="preUTC('-2')">Rio</A><BR><A
href="#"
onmouseover="preUTC('10')">Sydney</A><BR><A
href="#"
onmouseover="preUTC('9')">Tokyo</A><BR></DIV>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 4: must download files below
Files
rotaclock2930.gif (http://javascriptbank.com/javascript/time/rotaclock2930.gif)







JavaScript Countdown Timer (http://www.javascriptbank.com/javascript-countdown-timer.html/en/) - JavaScript Currency Format (http://www.javascriptbank.com/currency-format-script.html) - JavaScript Format Phone Number (http://www.javascriptbank.com/format-phone-number.html)

JavaScriptBank
December 27th, 2009, 20:49
This one line script changes the image (http://www.javascriptbank.com/javascript/image/) size and source on your thumbnail picture (http://www.javascriptbank.com/javascript/image/) without reloading the page or using popups.... detail (http://www.javascriptbank.com/enlarge-image-2.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/image/enlarge-image-2.jpg (http://www.javascriptbank.com/javascript/image/enlarge-image-2/preview/en/)
Demo: JavaScript Enlarge Image 2 (http://www.javascriptbank.com/enlarge-image-2.html/en/)


How to setup

Step 1: Copy & Paste HTML code below in your BODY section
HTML

<b>Single-click the image to enlarge it; double-click to make it small again.</b><br>

<img src="gif_logojsb2.gif" onclick="this.src='gif_logojsb2.gif';this.height=180;this.width=480" ondblclick="this.src='gif_logojsb2.gif';this.height=60;this.width=150">
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








JavaScript Countdown Timer (http://www.javascriptbank.com/javascript-countdown-timer.html/en/) - JavaScript Currency Format (http://www.javascriptbank.com/currency-format-script.html) - JavaScript Format Phone Number (http://www.javascriptbank.com/format-phone-number.html)

JavaScriptBank
December 30th, 2009, 20:00
This JavaScript tutorial (http://www.javascriptbank.com/thietkeweb/javascriptmall/) will show you how to combine RSS, AJAX, and JavaScript (http://www.javascriptbank.com/javascript/) to create a real-time RSS ticker.

Thanks to AJAX... detail (http://www.javascriptbank.com/rss-ajax-newsticker.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/ajax/rss-ajax-newsticker.jpg (http://www.javascriptbank.com/javascript/ajax/rss-ajax-newsticker/preview/en/)
Demo: JavaScript RSS AJAX Newsticker (http://www.javascriptbank.com/rss-ajax-newsticker.html/en/)


How to setup

Step 1: Use JavaScript code below to setup the script
JavaScript

<script type="text/javascript" src="rssticker.js"></script>

Step 2: Place HTML below in your BODY section
HTML

CNN:
<DIV style="HEIGHT: 100px; border-style: dotted; border-width: 1px; background-color: silver; text-align: left;">
<script type="text/javascript">
//rss_ticker(RSS_id, cachetime, divId, divClass, delay, optionalswitch)
new rss_ticker("CNN", 60, "cnnbox", "cnnclass", 200)

</script>
</DIV>
<br><br><br>
Each ticker on the page can be invoked independently, for example:
<DIV style="HEIGHT: 100px; border-style: dotted; border-width: 1px; background-color: silver; text-align: left;">
<PRE><script type="text/javascript">
//rss_ticker(RSS_id, cachetime, divId, divClass, delay, optionalswitch)
new rss_ticker("CNN", 60, "cnnbox", "cnnclass", 2000)
</script></PRE>

</DIV>

Step 3: downloads
Files
rssticker.js (http://www.javascriptbank.com/javascript/ajax/RSS_AJAX_Newsticker/rssticker.js)







Javascript floating message (http://www.javascriptbank.com/floating-message-scroller.html) - Javascript multi level drop down menu (http://www.javascriptbank.com/javascript-multi-level-drop-down-menu.html) - JavaScript in_array() (http://www.javascriptbank.com/in-array.html)

JavaScriptBank
January 11th, 2010, 11:01
Cast an interactive 'spotlight' on the image of your choice using this DHTML script. Move the light about using your mouse. This cool effect works in IE4+, degrading well with the rest.... detail (http://www.javascriptbank.com/spotlight-index.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/background/spotlight.jpg (http://www.javascriptbank.com/javascript/background/spotlight-index/preview/en/)
Demo: JavaScript Spotlight (http://www.javascriptbank.com/spotlight-index.html/en/)


How to setup

Step 1: CSS below for styling thescript, place it into HEAD section
CSS

<style type="text/css">
<!--
body{
background-image : url('none') !important;
}

#content{
background-color : #ffffff;
position : absolute;
top : 0px;
left : 0px;
padding : 10px;
visibility : hidden;
}

#light{
position : absolute;
top : 0px;
left : 0px;
overflow : hidden;
}
//-->
</style>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Place HTML below in your BODY section
HTML

<script type="text/javascript" src="spotlight_part_1.js"></script>
<script type="text/javascript" src="spotlight_part_2.js"></script>
<div style="z-index: 110;"></div>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 3: Download files below
Files
spotlight_part_1.js (http://javascriptbank.com/javascript/background/spotlight/spotlight_part_1.js)
spotlight_part_2.js (http://javascriptbank.com/javascript/background/spotlight/spotlight_part_2.js)

spotlight.gif (http://javascriptbank.com/javascript/background/spotlight/spotlight.gif)







JavaScript Vertical Marquee (http://www.javascriptbank.com/vertical-marquee.html) - JavaScript DHTML analog clock (http://www.javascriptbank.com/dhtml-analog-clock-ii.html/en/) - JavaScript Backwards Text (http://www.javascriptbank.com/backwards-text-2-index.html)

JavaScriptBank
January 14th, 2010, 19:36
One of the many cursor (http://www.javascriptbank.com/javascript/very nice mouse/) codes in our JavaScript library, this one creates dancing stars animating around your pointers mouse. This cur... detail (http://www.javascriptbank.com/=cursor move) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/mouse/dancing-animation-stars-cursor.jpg (http://www.javascriptbank.com/javascript/mouse/trailer/dancing-animation-stars-cursor/preview/en/)
Demo: JavaScript Dancing Animation Stars Cursor (http://www.javascriptbank.com/dancing-animation-stars-cursor.html/en/)


[U]How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript

<script language="JavaScript">
<!--
/*
Dancing Stars cursor (Submitted by Kurt at kurt.grigg@virgin.net)
Modified and permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

if (document.all){
document.write('<div id="starsDiv" style="position:absolute;top:0px;left:0px">')
for (xy=0;xy<7;xy++)
document.write('<div style="position:relative;width:3px;height:3px;background:#FFFF00;fo nt-size:2px;visibility:visible"></div>')
document.write('</div>')
}

if (document.layers)
{window.captureEvents(Event.MOUSEMOVE);}
var yBase = 200;
var xBase = 200;
var yAmpl = 10;
var yMax = 40;
var step = .2;
var ystep = .5;
var currStep = 0;
var tAmpl=1;
var Xpos = 1;
var Ypos = 1;
var i = 0;
var j = 0;

if (document.all)
{
function MoveHandler(){
Xpos = document.body.scrollLeft+event.x;
Ypos = document.body.scrollTop+event.y;
}
document.onmousemove = MoveHandler;
}

else if (document.layers)
{
function xMoveHandler(evnt){
Xpos = evnt.pageX;
Ypos = evnt.pageY;
}
window.onMouseMove = xMoveHandler;
}



function animateLogo() {
if (document.all)
{
yBase = window.document.body.offsetHeight/4;
xBase = window.document.body.offsetWidth/4;
}
else if (document.layers)
{
yBase = window.innerHeight/4 ;
xBase = window.innerWidth/4;
}

if (document.all)
{
var totaldivs=document.all.starsDiv.all.length
for ( i = 0 ; i < totaldivs ; i++ )
{
var tempdiv=document.all.starsDiv.all[i].style
tempdiv.top = Ypos + Math.cos((20*Math.sin(currStep/20))+i*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
tempdiv.left = Xpos + Math.sin((20*Math.sin(currStep/20))+i*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
}
}

else if (document.layers)
{
for ( j = 0 ; j < 7 ; j++ )
{
var templayer="a"+j
document.layers[templayer].top = Ypos + Math.cos((20*Math.sin(currStep/20))+j*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
document.layers[templayer].left =Xpos + Math.sin((20*Math.sin(currStep/20))+j*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
}
}
currStep += step;
setTimeout("animateLogo()", 15);
}
animateLogo();
// -->
</script>

Step 2: Place HTML below in your BODY section
HTML

<LAYER NAME="a0" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a1" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a2" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a3" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a4" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a5" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a6" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>







JavaScript Vertical Marquee (http://www.javascriptbank.com/vertical-marquee.html) - JavaScript DHTML analog clock (http://www.javascriptbank.com/dhtml-analog-clock-ii.html/en/) - JavaScript Backwards Text (http://www.javascriptbank.com/backwards-text-2-index.html)

JavaScriptBank
January 18th, 2010, 21:16
When designing web site (http://www.javascriptbank.com/), sometimes we need to fill areas of layout with some text, and we usually do this thing by making some copy & paste (http://www.javascriptbank.com/title=copy paste) on any conte... detail (http://www.javascriptbank.com/random-text-generator.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/utility/random-text-generator.jpg (http://www.javascriptbank.com/javascript/utility/generator/random-text-generator/preview/en/)
Demo: JavaScript Random Text Generator (http://www.javascriptbank.com/random-text-generator.html/en/)


How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript

<script type="text/javascript">
// Created by: Will Munslow | http://subterrane.com

function objectTag() {
var lorem = new Array();

switch(document.loremForm.loremString.value) {
case "latin": {
lorem[0] = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.";
break;
}
case "silly": {
lorem[0] = "Epsum factorial non deposit quid pro quo hic escorol. Olypian quarrels et gorilla congolium sic ad nauseum. Souvlaki ignitus carborundum e pluribus unum. Defacto lingo est igpay atinlay. Marquee selectus non provisio incongruous feline nolo contendre. Gratuitous octopus niacin, sodium glutimate. Quote meon an estimate et non interruptus stadium. Sic tempus fugit esperanto hiccup estrogen. Glorious baklava ex librus hup hey ad infinitum. Non sequitur condominium facile et geranium incognito. Epsum factorial non deposit quid pro quo hic escorol. Marquee selectus non provisio incongruous feline nolo contendre Olypian quarrels et gorilla congolium sic ad nauseum. Souvlaki ignitus carborundum e pluribus unum.";
break;
}
case "spanish": {
lorem[0] = "Li Europan lingues es membres del sam familie. Lor separat existentie es un myth. Por scientie, musica, sport etc., li tot Europa usa li sam vocabularium. Li lingues differe solmen in li grammatica, li pronunciation e li plu commun vocabules. Omnicos directe al desirabilit? de un nov lingua franca: on refusa continuar payar custosi traductores. It solmen va esser necessi far uniform grammatica, pronunciation e plu sommun paroles.";
break;
}
case "italian": {
lorem[0] = "Ma quande lingues coalesce, li grammatica del resultant lingue es plu simplic e regulari quam ti del coalescent lingues. Li nov lingua franca va esser plu simplic e regulari quam li existent Europan lingues. It va esser tam simplic quam Occidental: in fact, it va esser Occidental. A un Angleso it va semblar un simplificat Angles, quam un skeptic Cambridge amico dit me que Occidental es."
break;
}
}

if ("characters" == document.loremForm.type.value) {
var outputString = '';
var numOfChars = document.loremForm.numbers.value;
numOfChars = parseInt( numOfChars );
var tempString = lorem.join( "nn" );
while (
outputString.length < numOfChars ) outputString += tempString;
document.loremForm.output.value = outputString.substring(0, numOfChars ); // changed
} else if("words" == document.loremForm.type.value) {
var numOfWords = document.loremForm.numbers.value;
numOfWords = parseInt( numOfWords );
var list = new Array();
var wordList = new Array();
wordList = lorem[0].split( ' ' );
var iParagraphCount = 0;
var iWordCount = 0;

while( list.length < numOfWords ) {
if( iWordCount > wordList.length ) {
iWordCount = 0;
iParagraphCount++;
if( iParagraphCount + 1 > lorem.length ) iParagraphCount = 0;
wordList = lorem[ iParagraphCount ].split( ' ' );
wordList[0] = "nn" + wordList[ 0 ];
}
list.push( wordList[ iWordCount ] );
iWordCount++;
}
document.loremForm.output.value = list.join(' '); // changed
} else {
var numOfParagraphs = document.loremForm.numbers.value;
numOfParagraphs = parseInt( numOfParagraphs );
var list = new Array();
var iParagraphCount = 0;

while(list.length < numOfParagraphs) {
if(iParagraphCount +1 > lorem.length) {
iParagraphCount = 0;
}
list.push( lorem[iParagraphCount] );
iParagraphCount++;
}
document.loremForm.output.value = list.join( "nn" ); // changed
}
}

function copypaste() {
document.loremForm.output.focus();
document.loremForm.output.select();
therange=document.loremForm.output.createTextRange();
therange.execCommand("Copy");
}
</script>

Step 2: Place HTML below in your BODY section
HTML

<form name="loremForm" action="javascript:objectTag();" id="loremForm">
<strong>Select language type ...</strong>
<select name="loremString" style="width: 100%;">
<option value="latin" selected="selected">Lorem ipsum dolor sit amet...</option>
<option value="silly">Epsum factorial non deposit quid pro quo...</option>
<option value="spanish">Li Europan lingues es membres del sam familie...</option>
<option value="italian">Ma quande lingues coalesce, li grammatica...</option>
</select><br />

<strong>Select number of </strong>
<select name="type">
<option value="characters">Characters</option>
<option value="words" selected="selected">Words</option>
<option value="paragraphs">Paragraphs</option>
</select>
<input type="text" name="numbers" value="8" size="4">
<input type="submit" name="btnOK" value="Generate">
<br />
<textarea rows="10" name="output" style="width: 100%;"></textarea>
<br />
<input type="button" onclick="copypaste()" value="Select Text" name="select">
<input type="button" onclick=document.loremForm.reset() value="Reset form">
</form>







JavaScript Vertical Marquee (http://www.javascriptbank.com/vertical-marquee.html) - JavaScript DHTML analog clock (http://www.javascriptbank.com/dhtml-analog-clock-ii.html/en/) - JavaScript Backwards Text (http://www.javascriptbank.com/backwards-text-2-index.html)

JavaScriptBank
January 21st, 2010, 21:36
This JavaScript (http://www.javascriptbank.com/javascript/) accepts a number or string and formats it like U.S. currency. Adds the dollar sign, rounds to two places past the decimal, adds place holding zeros, and comm... detail (http://www.javascriptbank.com/currency-format-script.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/utility/currency-format-script.jpg (http://www.javascriptbank.com/javascript/utility/converter/currency-format-script/preview/en/)
Demo: JavaScript Currency Format script (http://www.javascriptbank.com/currency-format-script.html/en/)


How to setup

Step 1: Use JavaScript code below to setup the script
JavaScript

<SCRIPT LANGUAGE="JavaScript">
// Cyanide_7 (leo7278@hotmail.com) | http://www7.ewebcity.com/cyanide7

<!-- Begin
function formatCurrency(num) {
num = num.toString().replace(/\$|\,/g,'');
if(isNaN(num))
num = "0";
sign = (num == (num = Math.abs(num)));
num = Math.floor(num*100+0.50000000001);
cents = num%100;
num = Math.floor(num/100).toString();
if(cents<10)
cents = "0" + cents;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4*i+3))+','+
num.substring(num.length-(4*i+3));
return (((sign)?'':'-') + '$' + num + '.' + cents);
}
// End -->
</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Copy & Paste HTML code below in your BODY section
HTML

<form name=currencyform>
Enter a number then click the button: <input type=text name=input size=10 value="1000434.23">
<input type=button value="Convert" onclick="this.form.input.value=formatCurrency(this.form.input.value);">
<br><br>
or enter a number and click another field: <input type=text name=input2 size=10 value="1000434.23" onBlur="this.value=formatCurrency(this.value);">
</form>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








JavaScript Line Graph script (http://www.javascriptbank.com/line-graph-script-index.html) - JavaScript Virtual Keyboard (http://www.javascriptbank.com/virtualkeyboard-index.html) - JavaScript Horizontal Slider (http://www.javascriptbank.com/horizontal-slider-javascript-v2-2.html)

JavaScriptBank
January 25th, 2010, 20:30
By using your computer's clock, you can calculate the time in other time zones all over the world! Currently, the script works for eight of the major time zones. But, just change one entry (or just ad... detail (http://www.javascriptbank.com/world-clock-script.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/time/world-clock-script.jpg (http://www.javascriptbank.com/javascript/time/clock-time-date/world-clock-script/preview/en/)
Demo: JavaScript World Clock script (http://www.javascriptbank.com/world-clock-script.html/en/)


How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Emanuel Gavrilv (eltal@sprint.ca) -->

<!-- Begin
function GetTime() {
var dt = new Date();
var def = dt.getTimezoneOffset()/60;
var gmt = (dt.getHours() + def);
document.clock.local.value = (IfZero(dt.getHours()) + ":" + IfZero(dt.getMinutes()) + ":" + IfZero(dt.getSeconds()));
var ending = ":" + IfZero(dt.getMinutes()) + ":" + IfZero(dt.getSeconds());
var rome =check24(((gmt + 1) > 24) ? ((gmt + 1) - 24) : (gmt + 1));
document.clock.rome.value = (IfZero(rome) + ending);
var isr =check24(((gmt + 2) > 24) ? ((gmt + 2) - 24) : (gmt + 2));
document.clock.Israel.value = (IfZero(isr) + ending);
var msw =check24(((gmt + 3) > 24) ? ((gmt + 3) - 24) : (gmt + 3));
document.clock.msw.value = (IfZero(msw) + ending);
var baku =check24(((gmt + 4) > 24) ? ((gmt + 4) - 24) : (gmt + 4));
document.clock.baku.value = (IfZero(baku) + ending);
var del =check24(((gmt + 5) > 24) ? ((gmt + 5) - 24) : (gmt + 5));
document.clock.del.value = (IfZero(del) + ending);
var dh =check24(((gmt + 6) > 24) ? ((gmt + 6) - 24) : (gmt + 6));
document.clock.dh.value = (IfZero(dh) + ending);
var kok =check24(((gmt +7 ) > 24) ? ((gmt +7 ) - 24) : (gmt + 7));
document.clock.kok.value = (IfZero(kok) + ending);
var ho =check24(((gmt + 8) > 24) ? ((gmt + 8) - 24) : (gmt + 8));
document.clock.ho.value = (IfZero(ho) + ending);
var tky =check24(((gmt + 9) > 24) ? ((gmt + 9) - 24) : (gmt + 9));
document.clock.tky.value = (IfZero(tky) + ending);
var sdn =check24(((gmt + 10) > 24) ? ((gmt + 10) - 24) : (gmt + 10));
document.clock.sdn.value = (IfZero(sdn) + ending);
var mag =check24(((gmt + 11) > 24) ? ((gmt + 11) - 24) : (gmt + 11));
document.clock.mag.value = (IfZero(mag) + ending);
var wll =check24(((gmt + 12) > 24) ? ((gmt + 12) - 24) : (gmt + 12));
document.clock.wll.value = (IfZero(wll) + ending);

var _GMT =check24(((gmt) > 24) ? ((gmt) - 24) : (gmt));

document.clock._GMT.value = (IfZero(_GMT) + ":" + IfZero(dt.getMinutes()) + ":" + IfZero(dt.getSeconds()));
var eniw =check24(((gmt + (24-12)) > 24) ? ((gmt + (24-12)) - 24) : (gmt + (24-12)));
document.clock.eniw.value = (IfZero(eniw) + ending);
var sam =check24(((gmt + (24-11)) > 24) ? ((gmt + (24-11)) - 24) : (gmt + (24-11)));
document.clock.sam.value = (IfZero(sam) + ending);
var haw =check24(((gmt + (24-10)) > 24) ? ((gmt + (24-10)) - 24) : (gmt + (24-10)));
document.clock.Hawaii.value = (IfZero(haw) + ending);
var ala =check24(((gmt + (24-9)) > 24) ? ((gmt + (24-9)) - 24) : (gmt + (24-9)));
document.clock.alaska.value = (IfZero(ala) + ending);
var pacif =check24(((gmt + (24-8)) >= 24) ? ((gmt + (24-8)) - 24) : (gmt + (24-8)));
document.clock.pacif.value = (IfZero(pacif) + ending);
var mount =check24(((gmt + (24-7)) > 24) ? ((gmt + (24-7)) - 24) : (gmt + (24-7)));
document.clock.mount.value = (IfZero(mount) + ending);
var center =check24(((gmt + (24-6)) > 24) ? ((gmt + (24-6)) - 24) : (gmt + (24-6)));
document.clock.center.value = (IfZero(center) + ending);
var east =check24(((gmt + (24-5)) > 24) ? ((gmt + (24-5)) - 24) : (gmt + (24-5)));
document.clock.east.value = (IfZero(east) + ending);
var atl =check24(((gmt + (24-4)) > 24) ? ((gmt + (24-4)) - 24) : (gmt + (24-4)));
document.clock.atl.value = (IfZero(atl) + ending);
var bra =check24(((gmt + (24-3)) > 24) ? ((gmt + (24-3)) - 24) : (gmt + (24-3)));
bra = (bra >= 24) ? bra - 24 : bra;
document.clock.bra.value = (IfZero(bra) + ending);
var mid =check24(((gmt + (24-2)) > 24) ? ((gmt + (24-2)) - 24) : (gmt + (24-2)));
mid = (mid >= 24) ? mid - 24 : mid;
document.clock.mid.value = (IfZero(mid) + ending);
var azo =check24(((gmt + (24-1)) > 24) ? ((gmt + (24-1)) - 24) : (gmt + (24-1)));
azo = (azo >= 24) ? azo - 24 : azo;
document.clock.azo.value = (IfZero(azo) + ending);
setTimeout("GetTime()", 1000);
}
function IfZero(num) {
return ((num <= 9) ? ("0" + num) : num);
}
function check24(hour) {
return (hour >= 24) ? hour - 24 : hour;
}
// End -->
</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Copy & Paste HTML code below in your BODY section
HTML

<BODY onLoad="javascript:GetTime();">
<form name="clock">
<strong>Local Time <input type="text" size="8" name="local"></strong>
<p>
Eniwetok (GMT-12) <input type="text" size="8" name="eniw"><br>
Samoa (GMT-11) <input type="text" size="8" name="sam"><br>
Hawaii (GMT-10) <input type="text" size="8" name="Hawaii">
<p>
Alaska (GMT-9) <input type="text" size="8" name="alaska"><br>
Pacific Time (GMT-8) <input type="text" size="8" name="pacif"><br>
Mountain Time (GMT-7) <input type="text" size="8" name="mount">

<p>
Central Time (GMT-6) <input type="text" size="8" name="center"><br>
Eastern Time (GMT-5) <input type="text" size="8" name="east"><br>
Atlantic Time (GMT-4) <input type="text" size="8" name="atl">
<p>
Brazilia (GMT-3) <input type="text" size="8" name="bra"><br>
Mid-Atlantic (GMT-2) <input type="text" size="8" name="mid"><br>
Azores (GMT-1) <input type="text" size="8" name="azo">
<p>
<strong>Greenwich Mean Time (GMT) <input type="text" size="8" name="_GMT"></strong>

<p>
Rome (GMT +1) <input type="text" size="8" name="rome"><br>
Israel (GMT +2) <input type="text" size="8" name="Israel"><br>
Moscow (GMT +3) <input type="text" size="8" name="msw">
<p>
Baku (GMT +4) <input type="text" size="8" name="baku"><br>
New Delhi (GMT +5) <input type="text" size="8" name="del"><br>
Dhakar (GMT +6) <input type="text" size="8" name="dh">
<p>
Bangkok (GMT +7) <input type="text" size="8" name="kok"><br>

Hong Kong (GMT +8) <input type="text" size="8" name="ho"><br>
Tokyo (GMT +9) <input type="text" size="8" name="tky">
<p>
Sydney (GMT +10) <input type="text" size="8" name="sdn"><br>
Magadan (GMT +11) <input type="text" size="8" name="mag"><br>
Wellington (GMT +12) <input type="text" size="8" name="wll">
</form>
</body>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








JavaScript Line Graph script (http://www.javascriptbank.com/line-graph-script-index.html) - JavaScript Virtual Keyboard (http://www.javascriptbank.com/virtualkeyboard-index.html) - JavaScript Horizontal Slider (http://www.javascriptbank.com/horizontal-slider-javascript-v2-2.html)

JavaScriptBank
January 28th, 2010, 11:41
This JavaScript helps you open floating layer popups (http://www.javascriptbank.com/javascript/menu/floatable/). The layers alway stay on top, allowing your visitors to work in the main detail (http://www.javascriptbank.com/javascript/browser/wi... http://www.javascriptbank.com/javascript.images/browser/div-layer-popup-onclick.jpg (http://www.javascriptbank.com/javascript/browser/popup/div-layer-popup-onclick/preview/en/)
Demo: JavaScript DIV Layer Popup onClick (http://www.javascriptbank.com/div-layer-popup-onclick.html/en/)
[/CENTER]

[U]How to setup

Step 1: Use CSS code below for styling the script
CSS

<style type="text/css">
/*
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
*/
.jsbank_sample_cont {margin: 20px; padding: 20px;}
.jsbank_sample_tit {font-weight: bold; margin-bottom: 10px; padding: 5px; width: auto; background-color: #c0c0c0; border: 5px solid #a0a0a0; color: black; text-align: center;}
/*
Created by: Jeroen Haan
Web Site: http://www.haan.net/

*/
#layer1 {
position: absolute;
visibility: hidden;
width: 400px;
height: 300px;
left: 20px;
top: 300px;
background-color: #ccc;
border: 1px solid #000;
padding: 10px;
}

#close {
float: right;
}
</style>

Step 2: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<SCRIPT type=text/javascript>
<!--
// Created by: Jeroen Haan :: http://www.haan.net/

/* -----------------------------------------------
Floating layer - v.1
(c) 2006 www.haan.net
contact: jeroen@haan.net
You may use this script but please leave the credits on top intact.
Please inform us of any improvements made.
When usefull we will add your credits.
------------------------------------------------ */

x = 20;
y = 70;
function setVisible(obj)
{
obj = document.getElementById(obj);
obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
}
function placeIt(obj)
{
obj = document.getElementById(obj);
if (document.documentElement)
{
theLeft = document.documentElement.scrollLeft;
theTop = document.documentElement.scrollTop;
}
else if (document.body)
{
theLeft = document.body.scrollLeft;
theTop = document.body.scrollTop;
}
theLeft += x;
theTop += y;
obj.style.left = theLeft + 'px' ;
obj.style.top = theTop + 'px' ;
setTimeout("placeIt('layer1')",500);
}
window.onscroll = setTimeout("placeIt('layer1')",500);
//-->
</SCRIPT>

Step 3: Copy & Paste HTML code below in your BODY section
HTML

<DIV id=layer1><SPAN id=close><A style="TEXT-DECORATION: none"
href="javascript:setVisible('layer1')"><STRONG>Hide</STRONG></A></SPAN>
<P>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy
nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi
enim ad minim veniam, quis nostrud exerci.</P><BR><BR><IMG height=65
src="../image/logojs.gif" width=120 border=0> </DIV>
<p>This link uses the onclick event handler.<br>
<a href="#" onclick="setVisible('layer1');return false" target="_self">Open popup</a></p>

<p>This next one uses the javascript link inside the href tag.<br>
<a href="javascript:setVisible('layer1',true)">Open popup</a></p>

<form>
And this one uses the input button inside a form tag.<br>
<input type="button" value="Open popup" onclick="setVisible('layer1')">
</form>

<p>It can also be used in an image map. Here, the word 'Webhost' contains the link<br>
<img src="../image/logojs.gif" width="120" height="65" border="0" usemap="#Map">
<map name="Map" id="Map">
<area shape="rect" coords="1,1,113,23" href="#" onclick="setVisible('layer1');return false" target="_self">
</map>







JavaScript Spotlight (http://www.javascriptbank.com/spotlight-index.html) - JavaScript Validate E-Mail (http://www.javascriptbank.com/validate-e-mail.html) - AJAX Page Content Loader (http://www.javascriptbank.com/ajax-page-content-loader.html/en/)

JavaScriptBank
February 2nd, 2010, 23:52
Floating background (http://www.javascriptbank.com/javascript/background/) image (http://www.javascriptbank.com/javascript/image/) script animates any image (http://www.javascriptbank.com/javascript/image/) (or block of HTML) up and down the detail (... http://www.javascriptbank.com/javascript.images/image/up-down-floating-image.jpg (http://www.javascriptbank.com/javascript/image/up-down-floating-image/preview/en/)
Demo: JavaScript Up-down floating image (http://www.javascriptbank.com/up-down-floating-image.html/en/)
[/CENTER]

[U]How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript

<SCRIPT>
//detecting browser to dynamically write appropriate DIVs/LAYERs
N=(navigator.appName.indexOf('Netscape')!=-1&&parseInt(navigator.appVersion)<5)
S=(navigator.appName.indexOf('Netscape')!=-1&&parseInt(navigator.appVersion)>4.9)
M=(navigator.appName.indexOf('Microsoft')!=-1)



Vis=new Array()
Vis[0]=(M||S) ? "hidden" : "hide"
Vis[1]=(M||S) ? "visible" : "show"

function GetDiv(divId,divY,divX,divW,divH,bCol,visb,zInd){
bkCol=(bCol!="")?((N)?" bgColor="+bCol:";background:"+bCol):""

Styl = (M||S) ? "<DIV" : "<LAYER"

if(M||S){
Styl+=" ID="+divId
Styl+=" style='position:absolute;top:"+divY+";left:"+divX+";width:"+divW+";height:"+divH+bkCol
Styl+=";visibility:"+Vis[visb]+";z-index:"+zInd
Styl+="'>"
}

if(N){
Styl+=" ID="+divId
Styl+=" top="+divY+" left="+divX+" width="+divW+" height="+divH+bkCol
Styl+=" visibility="+Vis[visb]+" z-index="+zInd
Styl+=">"
}
document.writeln(Styl)
}

function EndDiv(){
(M||S)? document.writeln("</DIV>"): document.writeln("</LAYER>")
}

function PutIt(ID,dX,dY){
if(N){
document.layers[ID].left=dX
document.layers[ID].top=dY
}
if(M){
document.all[ID].style.left=dX
document.all[ID].style.top=dY
}
if(S){
document.getElementById(ID).style.left=dX
document.getElementById(ID).style.top=dY
}
}

function ShowHide(ID,vs){
if(N){
document.layers[ID].visibility=Vis[vs]
}
if(M){
document.all[ID].style.visibility=Vis[vs]
}
if(S){
document.getElementById(ID).style.visibility=Vis[vs]
}
}

function Xof(ID){
if(N){
return document.layers[ID].left
}
if(M){
return document.all[ID].style.left
}
if(S){
return document.getElementById(ID).style.left
}
}

function Yof(ID){
if(N){
return document.layers[ID].top
}
if(M){
return document.all[ID].style.top
}
if(S){
return document.getElementById(ID).style.top
}
}



function Zind(ID,zz){
if(N){
document.layers[ID].zIndex=zz
}
if(M){
document.all[ID].style.zIndex=zz
}
if(S){
document.getElementById(ID).style.zIndex=zz
}
}

function ChangeCol(ID,colrx){
if(M)document.all[ID].style.background=colrx
if(N)document.layers[ID].bgColor=colrx
if(S)document.getElementById(ID).style.background=colrx
}

function DivWrite(IdName,Str) {
if (N){
document.layers[IdName].document.write(Str)
document.layers[IdName].document.close()
}
if(M) document.all[IdName].innerHTML=Str
if(S) document.getElementById(IdName).innerHTML=Str
}
</SCRIPT>

<SCRIPT>
GetDiv('Top',0,0,100,100,'pink',1,0)
document.write("Top Place")
EndDiv()
GetDiv('Bottom',4000,0,100,100,'pink',1,0)
document.write("Bottom Place")
EndDiv()
d=50
y=0

function Scroll(){
y+=d
if(y>=3800)d=-50
if(y<=0)d=50
window.scroll(0,y)
}

setInterval('Scroll()',50)

</SCRIPT>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Place HTML below in your BODY section
HTML

<BODY background="pic191.jpg">
</BODY>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 3: must download files below
Files
pic191.jpg (http://javascriptbank.com/javascript/image/pic191.jpg)







JavaScript Line Graph script (http://www.javascriptbank.com/line-graph-script-index.html) - JavaScript Virtual Keyboard (http://www.javascriptbank.com/virtualkeyboard-index.html) - JavaScript Horizontal Slider (http://www.javascriptbank.com/horizontal-slider-javascript-v2-2.html)

JavaScriptBank
February 5th, 2010, 20:45
Script creates JavaScript menu (http://www.javascriptbank.com/javascript/menu/) with links (http://www.javascriptbank.com/javascript/link/) based on rollover (http://www.javascriptbank.com/title=roll over) effect. While moving detail (http://www.javascriptbank.com/javascript/mou... http://www.javascriptbank.com/javascript.images/image/onmouseover-slideshow.jpg (http://www.javascriptbank.com/javascript/image/slideshow/onmouseover-slideshow/preview/en/)
Demo: JavaScript OnMouseover Slideshow (http://www.javascriptbank.com/onmouseover-slideshow.html/en/)
[/CENTER]

[U]How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript

<script>

function changeimage(towhat,url){
if (document.images){
document.images.targetimage.src=towhat.src
gotolink=url
}
}
function warp(){
window.location=gotolink
}

</script>
<script language="JavaScript1.1">
var myimages=new Array()
var gotolink="#"

function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}


preloadimages("logojs.gif","photo1.jpg","photo2.jpg","photo3.jpg","photo4.jpg")
</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Place HTML below in your BODY section
HTML

<a href="" onMouseover="changeimage(myimages[0],this.href)">JavaScriptBank.com</a><br>
<a href="" onMouseover="changeimage(myimages[1],this.href)">JavaScriptBank.com</a><br>
<a href="" onMouseover="changeimage(myimages[2],this.href)">JavaScriptBank.com</a><br>
<a href="" onMouseover="changeimage(myimages[3],this.href)">JavaScriptBank.com</a><br>
<a href="" onMouseover="changeimage(myimages[4],this.href)">JavaScriptBank.com</a><br>
<a href="javascript:warp()"><img src="logojs.gif" name="targetimage" border=0></a>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








JavaScript Spotlight (http://www.javascriptbank.com/spotlight-index.html) - JavaScript Validate E-Mail (http://www.javascriptbank.com/validate-e-mail.html) - AJAX Page Content Loader (http://www.javascriptbank.com/ajax-page-content-loader.html/en/)

JavaScriptBank
February 9th, 2010, 23:34
The Internet is getting more and more important, we can use it for working, learning, for entertaining ... Only in the aspect of entertainment, we use the Internet to play the detail (http://www.javascriptbank.com/javascript/gam... http://www.javascriptbank.com/javascript.images/article/9-funniest-javascript-effects.jpg (http://www.javascriptbank.com/javascript/article/9-funniest-javascript-effects/preview/en/)
Demo: JavaScript 9 Funniest JavaScript effects (http://www.javascriptbank.com/9-funniest-javascript-effects.html/en/)
[/CENTER]

[U]How to setup







JavaScript Bookmark Page script (http://www.javascriptbank.com/bookmark-page-script.html) - JavaScript Color Wheel (http://www.javascriptbank.com/color-wheel.html) - JavaScript Image slideshow (http://www.javascriptbank.com/image-slideshow-transition.html)

JavaScriptBank
February 13th, 2010, 13:25
This JavaScript (http://www.javascriptbank.com/javascript/) converts special HTML characters (http://www.javascriptbank.com/javascript/text/) to their entities version inside user entered data such as a TEXTAREA before the detail (http://www.javascriptbank.com/j... http://www.javascriptbank.com/javascript.images/utility/html-to-entities-script.jpg (http://www.javascriptbank.com/javascript/utility/converter/html-to-entities-script/preview/en/)
Demo: JavaScript HTML to Entities script (http://www.javascriptbank.com/html-to-entities-script.html/en/)
[/CENTER]

[U]How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<SCRIPT type=text/javascript>

// HTML to Entities (form) script- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use

function html2entities(){
var re=/[(<>"'&]/g
for (i=0; i<arguments.length; i++)
arguments[i].value=arguments[i].value.replace(re, function(m){return replacechar(m)})
}

function replacechar(match){
if (match=="<")
return "&lt;"
else if (match==">")
return "&gt;"
else if (match=="\"")
return "&quot;"
else if (match=="'")
return "&#039;"
else if (match=="&")
return "&amp;"
}


</SCRIPT>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Copy & Paste HTML code below in your BODY section
HTML

<FORM><TEXTAREA style="WIDTH: 400px; HEIGHT: 100px" name=data1></TEXTAREA><BR>
<INPUT onclick=html2entities(this.form.data1) type=button value="Convert special chars to entities">
</FORM>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








Command to print web page in javascript (http://www.javascriptbank.com/window-print-method.html) - Javascript Time Picker (http://www.javascriptbank.com/time-picker-with-child-window.html) - JavaScript Go To URL Box (http://www.javascriptbank.com/go-to-url.html)

JavaScriptBank
February 19th, 2010, 23:11
SexyBookmarks (http://sexybookmarks.net/" target="_blank) - a small plugin for sharing the useful & helpful links (http://www.javascriptbank.com/javascript/link/) on the famous social bookmark services (if... detail (http://www.javascriptbank.com/integrate-sexybookmarks-into-your-personal-page-with-javascript.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/article/integrate-sexybookmarks-into-your-personal-page-with-javascript.jpg (http://www.javascriptbank.com/javascript/article/how-to/integrate-sexybookmarks-into-your-personal-page-with-javascript/preview/en/)
Demo: JavaScript Integrate SexyBookmarks into your Personal page with JavaScript (http://www.javascriptbank.com/integrate-sexybookmarks-into-your-personal-page-with-javascript.html/en/)


How to setup

Step 1: Use JavaScript code below to setup the script
JavaScript

<script type="text/javascript">
/*
click handler for SexyBookmarks
Credit: Phong Thai Cao - http://www.JavaScriptBank.com
Please keep this creadit when you use this code
*/
jQuery('.sexy-bookmarks a.external').click(function() {
// get the current URL & encode it into the standard URI
var url = encodeURIComponent(window.location.href), desc = '';

// parse the description for the above URL by the text() method of jQuery
// the text must be placed in the P tag with ID="sexy-bookmarks-content"
// so you can change the container of description with another tag and/or another ID
if( jQuery('p.sexy-bookmarks-content').length ) {
desc = encodeURIComponent(jQuery('p.sexy-bookmarks-content').text());
}

// detect the social bookmark site user want to share your URL
// by checking the className of site that we'll declare in the HTML code
// and assign the URL & description we got into the current anchor
// then redirect to the clicked bookmark site, you can use window.open() method for opening the new window
switch(this.parentNode.className) {
case 'sexy-twittley':
this.href += '?title=' + document.title + '&amp;url=' + url + '&amp;desc=' + desc + '&amp;pcat=Internet&amp;tags=';
break;
case 'sexy-digg':
this.href += '?phase=2&title=' + document.title + '&url=' + url + '&desc=' + desc;
break;
case 'sexy-twitter':
this.href += '?status=RT+@your_twitter_id:+' + document.title + '+-+' + url;
break;
case 'sexy-scriptstyle':
this.href += '?title=' + document.title + '&url=' + url;
break;
case 'sexy-reddit':
this.href += '?title=' + document.title + '&amp;url=' + url;
break;
case 'sexy-delicious':
this.href += '?title=' + document.title + '&amp;url=' + url;
break;
case 'sexy-stumbleupon':
this.href += '?title=' + document.title + '&amp;url=' + url;
break;
case 'sexy-mixx':
this.href += '?title=' + document.title + '&amp;page_url=' + url + '&amp;desc=' + desc;
break;
case 'sexy-technorati':
this.href += '?add=' + url;
break;
case 'sexy-blinklist':
this.href += '?Action=Blink/addblink.php&amp;Title=' + document.title + '&amp;Url=' + url;
break;
case 'sexy-diigo':
this.href += '?title=' + document.title + '&amp;url=' + url + '&amp;desc=' + desc;
break;
case 'sexy-yahoobuzz':
this.href += '?submitHeadline=' + document.title + '&amp;submitUrl=' + url + '&amp;submitSummary=' + desc + '&amp;submitCategory=science&amp;submitAssetType=text';
break;
case 'sexy-myspace':
this.href += '?t=' + document.title + '&amp;u=' + url;
break;
case 'sexy-facebook':
this.href += '?t=' + document.title + '&amp;u=' + url;
break;
case 'sexy-designfloat':
this.href += '?title=' + document.title + '&amp;url=' + url;
break;
case 'sexy-devmarks':
this.href += '?posttitle=' + document.title + '&amp;posturl=' + url + '&amp;posttext=' + desc;
break;
case 'sexy-newsvine':
this.href += '?h=' + document.title + '&amp;u=' + url;
break;
case 'sexy-google':
this.href += '?op=add&amp;title=' + document.title + '&amp;bkmk=' + url;
break;
}
})
</script>

Step 2: Place HTML below in your BODY section
HTML

<script type="text/javascript" src="path/to/directory/js/jquery.js"></script>
<script type="text/javascript" src="path/to/directory/js/sexy-bookmarks-public.js"></script>
<link rel="stylesheet" type="text/css" href="path/to/directory/css/style.css" media="screen" />

<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-center sexy-bookmarks-bg-sexy">
<ul class="socials">
<li class="sexy-twittley"><a href="http://twittley.com/submit/" rel="nofollow" class="external" title="Submit this to Twittley">Submit this to Twittley</a></li>
<li class="sexy-digg"><a href="http://digg.com/submit" rel="nofollow" class="external" title="Digg this!">Digg this!</a></li>
<li class="sexy-twitter"><a href="http://twitter.com/home" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a></li>
<li class="sexy-scriptstyle"><a href="http://scriptandstyle.com/submit" rel="nofollow" class="external" title="Submit this to Script &amp; Style">Submit this to Script &amp; Style</a></li>
<li class="sexy-reddit"><a href="http://reddit.com/submit" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a></li>
<li class="sexy-delicious"><a href="http://del.icio.us/post" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a></li>
<li class="sexy-stumbleupon"><a href="http://www.stumbleupon.com/submit" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a></li>
<li class="sexy-mixx"><a href="http://www.mixx.com/submit" rel="nofollow" class="external" title="Share this on Mixx">Share this on Mixx</a></li>
<li class="sexy-technorati"><a href="http://technorati.com/faves" rel="nofollow" class="external" title="Share this on Technorati">Share this on Technorati</a></li>
<li class="sexy-blinklist"><a href="http://www.blinklist.com/index.php" rel="nofollow" class="external" title="Share this on Blinklist">Share this on Blinklist</a></li>
<li class="sexy-diigo"><a href="http://www.diigo.com/post">Post this on Diigo</a></li>
<li class="sexy-yahoobuzz"><a href="http://buzz.yahoo.com/submit/" rel="nofollow" class="external" title="Buzz up!">Buzz up!</a></li>
<li class="sexy-myspace"><a href="http://www.myspace.com/Modules/PostTo/Pages/" rel="nofollow" class="external" title="Post this to MySpace">Post this to MySpace</a></li>
<li class="sexy-facebook"><a href="http://www.facebook.com/share.php" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a></li>
<li class="sexy-designfloat"><a href="http://www.designfloat.com/submit.php" rel="nofollow" class="external" title="Submit this to DesignFloat">Submit this to DesignFloat</a></li>
<li class="sexy-devmarks"><a href="http://devmarks.com/index.php" rel="nofollow" class="external" title="Share this on Devmarks">Share this on Devmarks</a></li>
<li class="sexy-newsvine"><a href="http://www.newsvine.com/_tools/seed&amp;save" rel="nofollow" class="external" title="Seed this on Newsvine">Seed this on Newsvine</a></li>
<li class="sexy-google"><a href="http://www.google.com/bookmarks/mark" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a></li>
</ul>
</div>

Step 3: Download files below
Files
sexy-bookmarks-public.js (http://www.javascriptbank.com/javascript/article/Integrate_SexyBookmarks_into_your_Personal_page_with_JavaScr ipt/sexy-bookmarks-public.js)
sexy-bookmarks-style.css (http://www.javascriptbank.com/javascript/article/Integrate_SexyBookmarks_into_your_Personal_page_with_JavaScr ipt/sexy-bookmarks-style.css)
sexy-sprite.png (http://www.javascriptbank.com/javascript/article/Integrate_SexyBookmarks_into_your_Personal_page_with_JavaScr ipt/sexy-sprite.png)
sexy-trans.png (http://www.javascriptbank.com/javascript/article/Integrate_SexyBookmarks_into_your_Personal_page_with_JavaScr ipt/sexy-trans.png)
jquery.js (http://www.javascriptbank.com/javascript/article/Integrate_SexyBookmarks_into_your_Personal_page_with_JavaScr ipt/jquery.js)







JavaScript Countdown Timer (http://www.javascriptbank.com/javascript-countdown-timer.html/en/) - JavaScript Currency Format (http://www.javascriptbank.com/currency-format-script.html) - JavaScript Format Phone Number (http://www.javascriptbank.com/format-phone-number.html)

housefull
February 23rd, 2010, 18:43
JavaScript - an indispensable part for developing websites and web pages, whether that is simple pages or professional website, and whether you are senior or junior. Nowadays, JavaScript frameworks be... detail (http://www.javascriptbank.com/top-10-javascript-frameworks-by-google--yahoo--bing.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/article/top-10-javascript-frameworks-by-google--yahoo--bing.jpg (http://www.javascriptbank.com/javascript/article/top-10-javascript-frameworks-by-google--yahoo--bing/preview/en/)
Demo: Top 10 JavaScript Frameworks by Google, Yahoo, Bing (http://www.javascriptbank.com/top-10-javascript-frameworks-by-google--yahoo--bing.html/en/)


How to setup







Javascript Music Player (http://www.javascriptbank.com/web-based-music-player.html/en/) - Random Text Generator (http://www.javascriptbank.com/random-text-generator.html) - Floating Image Script (http://www.javascriptbank.com/up-down-floating-image.html)
This JavaScript code - date picker helps you choose a time through a popup window. Perhaps this feature is not new on [url="http://www.javascriptbank.com/"]J... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


Demo: Time Picker with child window

How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript
Code:

<script language="JavaScript" type="text/javascript" src="timePicker.js">
/*
Bassem R. Zohdy | bassem.zohdy@gmail.com
*/
</script>

Step 2: Place HTML below in your BODY section
HTML
Code:

<form name="form1">
<input id="field" onkeydown="time(this.id)"/>
</form>

Step 3: must download files below
Files
down.jpg
time.html
timePicker.js
up.jpg

housefull
February 23rd, 2010, 18:44
Thanks for sharing Script! It's great

JavaScriptBank
February 24th, 2010, 10:58
Need a system to rate an item on your web page? Let's implement the simple script to do that. This script is very easy to setup and modify, you only copy all JavaScript code into your web page (should... detail (http://www.javascriptbank.com/rating-star-script-index.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/utility/rating-star-script-index.jpg (http://www.javascriptbank.com/javascript/utility/rating-star-script-index/preview/en/)
Demo: JavaScript Rating star script (http://www.javascriptbank.com/rating-star-script-index.html/en/)


How to setup

Step 1: Use JavaScript code below to setup the script
JavaScript

<SCRIPT language=JavaScript>
string="<a href='http://javascriptbank.com/' style='text-decoration: none;'>JavaScriptBank.com</a>" // string to elastic text
pausetime=100; // time to elastic effect. Decrease to slow

// do not modify below this line
var sizes = new Array("-8px","-4px","-2px","-1px","0px", "1px", "2px", "4px", "8px", "16px", "32px");
sizes.pos = 0;

function rubberBand()
{
var el = document.all.elastic;
if (el.direction==null) {el.direction = 1;}
else if ((sizes.pos > sizes.length-2) || (sizes.pos==0)) {el.direction *= -1;}
el.style.letterSpacing = sizes[sizes.pos += el.direction];
setTimeout('rubberBand()',pausetime);
}
rubberBand();

</SCRIPT>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Copy & Paste HTML code below in your BODY section
HTML

<P id=elastic style="FONT-SIZE: 25px; POSITION: relative; TOP: 20px" align=center>
<!-- put desired text below. Replase my text. HTML tag allowed-->
<A href="http://javascriptbank.com/" style="text-decoration: none;">JavaScriptBank.com</A>
<!-- put desired text above. Replase my text. HTML tag allowed -->
</P>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








JavaScript Line Graph script (http://www.javascriptbank.com/line-graph-script-index.html) - JavaScript Virtual Keyboard (http://www.javascriptbank.com/virtualkeyboard-index.html) - JavaScript Horizontal Slider (http://www.javascriptbank.com/horizontal-slider-javascript-v2-2.html)

JavaScriptBank
March 1st, 2010, 19:37
Cross-Browser DHTML (http://www.javascriptbank.com/title=DHTML) Horizontal Slide Show: JavaScript (http://www.javascriptbank.com/javascript/) concatenates and slides any number of images from right to left. Adjustable: Size, Backgroun... detail (http://www.javascriptbank.com/horizontal-slider-javascript-v2-2.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/scroller/horizontal-slider-javascript-v2-2.jpg (http://www.javascriptbank.com/javascript/scroller/horizontal-scroller/horizontal-slider-javascript-v2-2/preview/en/)
Demo: JavaScript Horizontal Slider JavaScript v2.2 (http://www.javascriptbank.com/horizontal-slider-javascript-v2-2.html/en/)


How to setup

Step 1: Place CSS below in your HEAD section
CSS

<STYLE type=text/css>A {
TEXT-DECORATION: none
}
A:link {
COLOR: blue
}
A:visited {
COLOR: blue
}
A:hover {
COLOR: red; BACKGROUND-COLOR: #66ffff
}
.tab {
FONT-SIZE: 12px; FONT-FAMILY: Arial,Helvetica
}
.tabc {
FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: navy; FONT-FAMILY: Arial,Helvetica; TEXT-ALIGN: center
}
.tabt {
FONT-WEIGHT: bold; FONT-SIZE: 18px; COLOR: red; FONT-FAMILY: Arial,Helvetica; TEXT-ALIGN: center
}
</STYLE>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<SCRIPT language=JavaScript>
if(top.location != self.location)
top.location.replace(self.location);
</SCRIPT>

<SCRIPT language=javascript>

//If using any portion of this DEMO script,
//one must insert along this notice too:


/***********************************
vasile barsan
* http://javascripts.vbarsan.com/
* This notice may not be removed
***********************************/

var swidth=310;var sheight=50;var sspeed=2;var resspeed=sspeed;var restart=sspeed;var rspeed=sspeed;var imagef='';
preload1 = new Image();
preload1.src = "../image/gif_logojsb2.gif";
preload2 = new Image();
preload2.src = "../image/gif_logojsb.gif";
preload3 = new Image();
preload3.src = "../image/gif_logojsb2.gif";
var leftimage=new Array();
leftimage[0]='<a href="http://javascriptbank.com"><img src='+preload1.src+' width=310 height=47 alt="JavaScript Bank"></a>';
leftimage[1]='<a href="http://javascriptbank.com"><img src='+preload2.src+' width=310 height=47 alt="JavaScript Bank"></a>';
leftimage[2]='<a href="http://javascriptbank.com"><img src='+preload3.src+' width=310 height=47 alt="JavaScript Bank"></a>';
for(mi=0;mi<leftimage.length;mi++)imagef=imagef+leftimage[mi];
function goup(){if(sspeed!=rspeed*8){sspeed=sspeed*2;restart=sspeed;} }
function start(){if(document.getElementById)firstns6(document.getElem entById('slider'));else if(document.all)firstie(slider);else if(document.layers)firstns4(document.slider1.document.slider 2);}
var operbr=navigator.userAgent.toLowerCase().indexOf('opera');if (operbr==-1&&navigator.product&&navigator.product=="Gecko"){var agt = navigator.userAgent.toLowerCase();var rvStart = agt.indexOf('rv:');var rvEnd = agt.indexOf(')', rvStart);var check15 = agt.substring(rvStart+3, rvEnd);if(parseFloat(check15)>=1.8) operbr=0;}if (navigator.appVersion.indexOf("Mac")!=-1)operbr=0;
function firstns4(whichdiv){tdivns4=eval(whichdiv);tdivns4.document.w rite('<nobr>'+imagef+'</nobr>');tdivns4.document.close();thel=tdivns4.document.width;tdiv ns4.left=swidth;slidens4();}
function slidens4(){if(tdivns4.left>=thel*(-1)){tdivns4.left-=sspeed;setTimeout("slidens4()",100);}else{tdivns4.left=swidth;slidens4();}}
function firstie(whichdiv){tdivie=eval(whichdiv);tdivie.innerHTML=('<nobr>'+imagef+'</nobr>');thel=tdivie.offsetWidth;tdivie.style.pixelLeft=swidth;sli deie();}
function slideie(){if(tdivie.style.pixelLeft>thel*(-1)){tdivie.style.pixelLeft-=sspeed;setTimeout("slideie()",100);}else{tdivie.style.pixelLeft=swidth;slideie();}}
function firstns6(whichdiv){tdiv6=eval(whichdiv);tdiv6.innerHTML=('<nobr>'+imagef+'</nobr>');thel=tdiv6.offsetWidth;if(operbr!=-1){opslider.innerHTML='<nobr>'+imagef+'</nobr>';thel=opslider.offsetWidth;}tdiv6.style.left=swidth;slidens 6();}
function slidens6(){if(parseInt(tdiv6.style.left)>=thel*(-1)){tdiv6.style.left=parseInt(tdiv6.style.left)-sspeed;setTimeout("slidens6()",100);}else{tdiv6.style.left=swidth;slidens6();}}
</SCRIPT>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 3: Place HTML below in your BODY section
HTML

<BODY onload=start();>
<SCRIPT language=javascript>document.write('<table border=2 align="center" bgcolor="#ccffcc"><tr><td bgcolor="#ffffcc"><div class=tabc><b><a class=tab href="#" onClick="goup();">Speed<br>UP</a></b></div></td><td width='+swidth+'>');if(document.layers)document.write('<span style="borderWidth:0.1px; borderStyle:none; clip:rect(0 '+swidth+' '+sheight+' 0);"><ilayer width='+swidth+' height='+sheight+' name="slider1"><layer class=tabt width='+swidth+' height='+sheight+'>SLIDING SHOW</layer><layer width='+swidth+' height='+sheight+' name="slider2" onMouseover="sspeed=0;" onMouseout="sspeed=resspeed"></layer></ilayer></span>');else {document.write('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+ sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);">');if(operbr!=-1)document.write('<div id="opslider" style="position:absolute;visibility:hidden;"></div>');else document.write('<div class=tabt style="position:absolute;width:'+swidth+';height:'+sheight+';">SLIDING SHOW</div>');document.write('<div id="slider" style="position:relative;height:'+sheight+';" onMouseover="sspeed=0;" onMouseout="sspeed=resspeed"></div></div>');}</SCRIPT>
</TD></TR></TABLE><BR>
</fieldset>
</center>
<SCRIPT language=JavaScript>
function ctrlA0(corp) {
with(corp){
focus(); select()
}
if(document.all){
txt=corp.createTextRange()
txt.execCommand("Copy")
window.status='Text copied to clipboard'
}
else window.status='Press ctrl-c to copy the text to the clipboard'
setTimeout("window.status=''",5000)
}
</SCRIPT>
</body>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








JavaScript Countdown Timer (http://www.javascriptbank.com/javascript-countdown-timer.html/en/) - JavaScript Currency Format (http://www.javascriptbank.com/currency-format-script.html) - JavaScript Format Phone Number (http://www.javascriptbank.com/format-phone-number.html)

JavaScriptBank
March 4th, 2010, 19:42
This is a spinning three dimensional cube. Eight dots revolve by itself to create a motional cube.... detail (http://www.javascriptbank.com/3d-self-revolving-cube.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/3d/3d-self-revolving-cube.jpg (http://www.javascriptbank.com/javascript/3d/3d-self-revolving-cube/preview/en/)
Demo: JavaScript 3D self-revolving cube (http://www.javascriptbank.com/3d-self-revolving-cube.html/en/)


How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<SCRIPT language=javascript>
/*
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
*/

<!-- // (c) 2001 Till Nagel, till@netzministerium.de & Rene Sander, rene@netzministerium.de

// ---------------------------------------------------------------------------

// creates cube model with name and (a simple) material
var cubeModel = new Model("cube", new Material("&deg;"));

// defines model points.
// The model's points have to be defined before the respective code is written into the document.
cubeModel.setPoints(createCubeModelPoints());


// ---------------------------------------------------------------------------

// the matrix to transform the model with
var staticRotationMatrix = new Matrix();
staticRotationMatrix.rotateX(0.05);
staticRotationMatrix.rotateY(0.1);

// ---------------------------------------------------------------------------

function initOnLoad() {
fixNetscape();

// assign layer (only for Netscape 4.x, for all other browsers
// this is done automatically when writing the point code)
cubeModel.assignLayers();

// creates and inits matrix to initialize the model
var initMatrix = new Matrix();
initMatrix.scale(50, 50, 50);
// >> begin to work with the model etc.

// initializes model
cubeModel.transform(initMatrix);

// >> first draw of the model (recommended)
cubeModel.draw();

// starts animation
animate();
}

/*
* The main animate method. Calls itself repeatedly.
*/
function animate() {
var delay = 10;

// animates cube model ----------------------------------------

// rotates the cube
cubeModel.transform(staticRotationMatrix);

// updates display
cubeModel.draw();

// calls itself with an delay to decouple client computer speed from the animation speed.
// result: the animation is as fast as possible.
setTimeout("animate()", delay);
}



// ---------------------------------------------------------------------------

function createCubeModelPoints() {
// the cube model
return new Array(
// Point3D( x, y, z, m)
new Point3D( 1, 1, 1, 0),
new Point3D( 1, 1, -1, 0),
new Point3D( 1, -1, 1, 0),
new Point3D( 1, -1, -1, 0),
new Point3D(-1, 1, 1, 0),
new Point3D(-1, 1, -1, 0),
new Point3D(-1, -1, 1, 0),
new Point3D(-1, -1, -1, 0)
);
}

// -->
</SCRIPT>

Step 2: Copy & Paste HTML code below in your BODY section
HTML

<DIV id=fixnetscape style="POSITION: absolute; VISIBILITY: hidden"></DIV>
<SCRIPT language=JavaScript type=text/javascript>
<!-- // (c) 2001 Till Nagel, till@netzministerium.de & Rene Sander, rene@netzministerium.de

// MANDATORY: INSERTION OF HTML PART INTO PAGE
// creates the HTML code representing the model's points
// NB: This is written directly into the page from within the method
cubeModel.createPointCode();

// -->
</SCRIPT>

Step 3: Download files below
Files
LyrObj.js (http://www.javascriptbank.com/javascript/3d/js/LyrObj.js)
3dhtml.js (http://www.javascriptbank.com/javascript/3d/js/3dhtml.js)
ColorUtil.js (http://www.javascriptbank.com/javascript/3d/js/ColorUtil.js)
materials.js (http://www.javascriptbank.com/javascript/3d/js/materials.js)







JavaScript Vertical Marquee (http://www.javascriptbank.com/vertical-marquee.html) - JavaScript DHTML analog clock (http://www.javascriptbank.com/dhtml-analog-clock-ii.html/en/) - JavaScript Backwards Text (http://www.javascriptbank.com/backwards-text-2-index.html)

JavaScriptBank
March 8th, 2010, 19:31
This free JavaScript will add dropping animation (http://www.javascriptbank.com/en=dropping animation) for menus when users move mouse over a specified link, or they are set to appear through click. The menu also allo... detail (http://www.javascriptbank.com/animated-drop-down-navigation-menu.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/framework/animated-drop-down-navigation-menu.jpg (http://www.javascriptbank.com/javascript/framework/jquery/animated-drop-down-navigation-menu/preview/en/)
Demo: JavaScript Animated Drop Down Navigation Menu (http://www.javascriptbank.com/animated-drop-down-navigation-menu.html/en/)


How to setup

Step 1: Copy & Paste CSS code below in your HEAD section
CSS

<style type="text/css" name="jkoutlinemenu.css">
/*
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
*/
.outlinemenu{
position: absolute; /*leave this alone*/
display: none; /*leave this alone*/
width: 180px; /*default width of menu*/
border: 1px solid black;
overflow-x: hidden;
}

.outlinemenu ul{
list-style-type: none;
margin: 0;
padding: 0;
}

.outlinemenu ul li a{
background: white;
font: bold 13px "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif;
color: #00014e;
display: block;
width: auto;
padding: 3px 0;
padding-left: 5px;
text-decoration: none;
border-bottom: 1px solid #B5B5B5;
}

.outlinemenu ul li a:visited, .outlinemenu ul li a:active{
color: #00014e;
}

.outlinemenu ul li a:hover{
color: black;
background: #ffffcb;
}

/* Holly Hack for IE \*/
* html .outlinemenu li {height: 1%; }
* html .outlinemenu li a { height: 1%; }
/* End */
</style>

Step 2: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<script type="text/javascript" src="/javascript/jquery.js"></script>
<script type="text/javascript" name="jkoutlinemenu.js">
/***********************************************
* Animated Outline Menu- by JavaScript Kit (www.javascriptkit.com)
* This notice must stay intact for usage
* Visit JavaScript Kit at http://www.javascriptkit.com/ for full source code
***********************************************/
var jkoutlinemenu={

effectduration: 300, //duration of animation, in milliseconds
outlinemenulabels: [],
outlinemenus: [], //array to contain each block menu instances
zIndexVal: 1000, //starting z-index value for drop down menu
$shimobj: null,

addshim:function(){
$(document.body).append('<IFRAME id="outlineiframeshim" src="'+(location.protocol=="https:"? 'blank.htm' : 'about:blank')+'" style="display:none; left:0; top:0; z-index:999; position:absolute; filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opaci ty=0)" frameBorder="0" scrolling="no"></IFRAME>')
this.$shimobj=$("#outlineiframeshim")
//alert(this.$shimobj.attr("src"))
},

alignmenu:function(e, outlinemenu_pos){
var outlinemenu=this.outlinemenus[outlinemenu_pos]
var $anchor=outlinemenu.$anchorobj
var $menu=outlinemenu.$menuobj
var menuleft=($(window).width()-(outlinemenu.offsetx-$(document).scrollLeft())>outlinemenu.actualwidth)? outlinemenu.offsetx : outlinemenu.offsetx-outlinemenu.actualwidth+outlinemenu.anchorwidth //get x coord of menu
var menutop=($(window).height()-(outlinemenu.offsety-$(document).scrollTop()+outlinemenu.anchorheight)>outlinemenu.actualheight)? outlinemenu.offsety+outlinemenu.anchorheight : outlinemenu.offsety-outlinemenu.actualheight //get y coord of menu
$menu.css({left:menuleft+"px", top:menutop+"px"})
this.$shimobj.css({width:outlinemenu.actualwidth+"px", height:outlinemenu.actualheight+"px", left:menuleft+"px", top:menutop+"px", display:"block"})
},

showmenu:function(e, outlinemenu_pos){
var outlinemenu=this.outlinemenus[outlinemenu_pos]
var $menu=outlinemenu.$menuobj
var $menuinner=outlinemenu.$menuinner
if ($menu.css("display")=="none"){
this.alignmenu(e, outlinemenu_pos)
$menu.css("z-index", ++this.zIndexVal)
$menu.show(this.effectduration, function(){
$menuinner.css('visibility', 'visible')
})
}
else if ($menu.css("display")=="block" && e.type=="click"){ //if menu is hidden and this is a "click" event (versus "mouseout")
this.hidemenu(e, outlinemenu_pos)
}
return false
},

hidemenu:function(e, outlinemenu_pos){
var outlinemenu=this.outlinemenus[outlinemenu_pos]
var $menu=outlinemenu.$menuobj
var $menuinner=outlinemenu.$menuinner
$menuinner.css('visibility', 'hidden')
this.$shimobj.css({display:"none", left:0, top:0})
$menu.hide(this.effectduration)
},

definemenu:function(anchorid, menuid, revealtype, optwidth, optheight){
var $=jQuery
this.outlinemenulabels.push([anchorid, menuid, revealtype, optwidth, optheight])
},

render:function($){
for (var i=0, labels=this.outlinemenulabels[i]; i<this.outlinemenulabels.length; i++, labels=this.outlinemenulabels[i]){
this.outlinemenus.push({$anchorobj:$("#"+labels[0]), $menuobj:$("#"+labels[1]), $menuinner:$("#"+labels[1]).children('ul:first-child'), revealtype:labels[2]})
var outlinemenu=this.outlinemenus[i]
outlinemenu.$anchorobj.add(outlinemenu.$menuobj).attr("_outlinemenupos", i+"pos")
outlinemenu.$menuobj.css(parseInt(labels[3])>10? {width:parseInt(labels[3])+"px"} : {})
outlinemenu.$menuobj.css(parseInt(labels[4])<outlinemenu.$menuobj.height()? {height:parseInt(labels[4])+"px", overflow:"scroll", overflowX:"hidden"} : {})
outlinemenu.actualwidth=outlinemenu.$menuobj.outerWidth()
outlinemenu.actualheight=outlinemenu.$menuobj.outerHeight()
outlinemenu.offsetx=outlinemenu.$anchorobj.offset().left
outlinemenu.offsety=outlinemenu.$anchorobj.offset().top
outlinemenu.anchorwidth=outlinemenu.$anchorobj.outerWidth()
outlinemenu.anchorheight=outlinemenu.$anchorobj.outerHeight( )
outlinemenu.$menuobj.css("z-index", ++this.zIndexVal).hide()
outlinemenu.$menuinner.css("visibility", "hidden")
outlinemenu.$anchorobj.bind(outlinemenu.revealtype=="click"? "click" : "mouseenter", function(e){
return jkoutlinemenu.showmenu(e, parseInt(this.getAttribute("_outlinemenupos")))
})
outlinemenu.$anchorobj.bind("mouseleave", function(e){
var $menu=jkoutlinemenu.outlinemenus[parseInt(this.getAttribute("_outlinemenupos"))].$menuobj
if (e.relatedTarget!=$menu.get(0) && $(e.relatedTarget).parents("#"+$menu.get(0).id).length==0){ //check that mouse hasn't moved into menu object
jkoutlinemenu.hidemenu(e, parseInt(this.getAttribute("_outlinemenupos")))
}
})
outlinemenu.$menuobj.bind("click mouseleave", function(e){
jkoutlinemenu.hidemenu(e, parseInt(this.getAttribute("_outlinemenupos")))
})
} //end for loop
$(document).bind("click", function(e){
for (var i=0; i<jkoutlinemenu.outlinemenus.length; i++){
jkoutlinemenu.hidemenu(e, i)
}
}) //end document.click
$(window).bind("resize", function(){
for (var i=0; i<jkoutlinemenu.outlinemenus.length; i++){
var outlinemenu=jkoutlinemenu.outlinemenus[i]
outlinemenu.offsetx=outlinemenu.$anchorobj.offset().left
outlinemenu.offsety=outlinemenu.$anchorobj.offset().top
}
})
jkoutlinemenu.addshim()
}

}

jQuery(document).ready(function($){
jkoutlinemenu.render($)
})
/*
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
*/
</script>

Step 3: Copy & Paste HTML code below in your BODY section
HTML

<a href="#" id="designanchor">Web Design Links</a>

<br /><br />

<div style="text-align:right"><a href="#" id="designanchor2">More web Design Links</a></div>


<!--Define HTML for all animated menus at the very end of the page (ie: right before </body> tag)!-->

<div id="mymenu1" class="outlinemenu">
<ul>
<li><a href="http://www.dynamicdrive.com/">JavaScript Kit</a></li>
<li><a href="http://www.dynamicdrive.com/" >Dynamic Drive</a></li>
<li><a href="http://www.javascriptbank.com/">JavaScript Bank</a></li>
<li><a href="http://www.dynamicdrive.com/style/" >CSS Library</a></li>
<li><a href="http://www.javascriptkit.com/jsref/">JavaScript Reference</a></li>
<li><a href="http://www.javascriptkit.com/domref/">DOM Reference</a></li>
<li><a href="http://www.cssdrive.com">CSS Drive</a></li>
<li><a href="http://www.javascriptbank.com/forum/">JavaScript Forums</a></li>
<li><a href="http://www.javascriptbank.com/service/">JavaScript Services</a></li>
<li><a href="http://www.codingforums.com/" style="border-bottom-width: 0">Coding Forums</a></li>
</ul>
</div>

<script type="text/javascript">
//jkoutlinemenu.definemenu("anchorid", "menuid", "mouseover|click", optional_width, optional_height)
jkoutlinemenu.definemenu("designanchor", "mymenu1", "mouseover", 180)
</script>


<div id="mymenu2" class="outlinemenu">
<ul>
<li><a href="http://www.dynamicdrive.com/">JavaScript Kit</a></li>
<li><a href="http://www.dynamicdrive.com/">Dynamic Drive</a></li>
<li><a href="http://www.javascriptbank.com/">JavaScript Bank</a></li>
<li><a href="http://www.dynamicdrive.com/style/" >CSS Library</a></li>
<li><a href="http://www.javascriptbank.com/forum/">JavaScript Forums</a></li>
<li><a href="http://www.javascriptbank.com/service/">JavaScript Services</a></li>
<li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C1/">Horizontal CSS Menus</a></li>
<li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C2/">Vertical CSS Menus</a></li>
<li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C4/">Image CSS</a></li>
<li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C6/">Form CSS</a></li>
<li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C5/">DIVs and containers</a></li>
<li><a href="http://www.dynamicdrive.com/style/csslibrary/category/C7/">Links & Buttons</a></li>
<li><a href="http://www.javascriptkit.com/jsref/">JavaScript Reference</a></li>
<li><a href="http://www.javascriptkit.com/domref/">DOM Reference</a></li>
<li><a href="http://www.cssdrive.com">CSS Drive</a></li>
<li><a href="http://www.codingforums.com/" style="border-bottom-width: 0">Coding Forums</a></li>
</ul>
</div>

<script type="text/javascript">
//jkoutlinemenu.definemenu("anchorid", "menuid", "mouseover|click", optional_width, optional_height)
jkoutlinemenu.definemenu("designanchor2", "mymenu2", "mouseover", 170, 150)
</script>







Command to print web page in javascript (http://www.javascriptbank.com/window-print-method.html) - Javascript Time Picker (http://www.javascriptbank.com/time-picker-with-child-window.html) - JavaScript Go To URL Box (http://www.javascriptbank.com/go-to-url.html)

JavaScriptBank
March 12th, 2010, 20:40
As the title of this post said, you should choose one of these JavaScript ebooks, or some ebooks to start learning if you are JavaScript (or Progamming) beginners. So if you are an expert? Then I hope... detail (http://www.javascriptbank.com/top-10-best-javascript-ebooks-that-beginners-should-learn.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/article/top-10-best-javascript-ebooks-that-beginners-should-learn.jpg (http://www.javascriptbank.com/javascript/article/top-10-best-javascript-ebooks-that-beginners-should-learn/preview/en/)
Demo: JavaScript Top 10 Best JavaScript eBooks that Beginners should Learn (http://www.javascriptbank.com/top-10-best-javascript-ebooks-that-beginners-should-learn.html/en/)


How to setup







JavaScript Line Graph script (http://www.javascriptbank.com/line-graph-script-index.html) - JavaScript Virtual Keyboard (http://www.javascriptbank.com/virtualkeyboard-index.html) - JavaScript Horizontal Slider (http://www.javascriptbank.com/horizontal-slider-javascript-v2-2.html)

JavaScriptBank
March 16th, 2010, 05:55
This JavaScript tutorial (http://www.javascriptbank.com/thietkeweb/javascriptmall/) will show you how to combine RSS, AJAX, and JavaScript (http://www.javascriptbank.com/javascript/) to create a real-time RSS ticker.

Thanks to AJAX... detail (http://www.javascriptbank.com/rss-ajax-newsticker.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/ajax/rss-ajax-newsticker.jpg (http://www.javascriptbank.com/javascript/ajax/rss-ajax-newsticker/preview/en/)
Demo: JavaScript RSS AJAX Newsticker (http://www.javascriptbank.com/rss-ajax-newsticker.html/en/)


How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript

<script type="text/javascript" src="rssticker.js"></script>

Step 2: Place HTML below in your BODY section
HTML

CNN:
<DIV style="HEIGHT: 100px; border-style: dotted; border-width: 1px; background-color: silver; text-align: left;">
<script type="text/javascript">
//rss_ticker(RSS_id, cachetime, divId, divClass, delay, optionalswitch)
new rss_ticker("CNN", 60, "cnnbox", "cnnclass", 200)

</script>
</DIV>
<br><br><br>
Each ticker on the page can be invoked independently, for example:
<DIV style="HEIGHT: 100px; border-style: dotted; border-width: 1px; background-color: silver; text-align: left;">
<PRE><script type="text/javascript">
//rss_ticker(RSS_id, cachetime, divId, divClass, delay, optionalswitch)
new rss_ticker("CNN", 60, "cnnbox", "cnnclass", 2000)
</script></PRE>

</DIV>

Step 3: must download files below
Files
rssticker.js (http://www.javascriptbank.com/javascript/ajax/RSS_AJAX_Newsticker/rssticker.js)







Command to print web page in javascript (http://www.javascriptbank.com/window-print-method.html) - Javascript Time Picker (http://www.javascriptbank.com/time-picker-with-child-window.html) - JavaScript Go To URL Box (http://www.javascriptbank.com/go-to-url.html)

JavaScriptBank
March 19th, 2010, 22:11
Displays images continuously in a slideshow presentation format, with a fade effect on image (http://www.javascriptbank.com/javascript/image/) transitions. (Fade in Internet Explorer 4+ only).... detail (http://www.javascriptbank.com/fading-slide-show.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/image/fading-slide-show.jpg (http://www.javascriptbank.com/javascript/image/slideshow/fading-slide-show/preview/en/)
Demo: JavaScript Fading Slide Show (http://www.javascriptbank.com/fading-slide-show.html/en/)


How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript

<script>
/*
Original: CodeLifter.com (support@codelifter.com)
Web Site: http://www.codelifter.com
*/

// set the following variables
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000

// Duration of crossfade (seconds)
var crossFadeDuration = 3

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = 'logojs.gif'
Pic[1] = 'photo3.jpg'
Pic[2] = 'logojs.gif'
Pic[3] = 'photo5.jpg'
Pic[4] = 'photo2.jpg'

// do not edit anything below this line

var t
var j = 0
var p = Pic.length
var preLoad = new Array()
for (i = 0; i < p; i++){
preLoad[i] = new Image()
preLoad[i].src = Pic[i]
}

function runSlideShow(){
if (document.all){
document.images.SlideShow.style.filter="blendTrans(duration=2)"
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
document.images.SlideShow.filters.blendTrans.Apply()
}
document.images.SlideShow.src = preLoad[j].src
if (document.all){
document.images.SlideShow.filters.blendTrans.Play()
}
j = j + 1
if (j > (p-1)) j=0
t = setTimeout('runSlideShow()', slideShowSpeed)
}
</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Place HTML below in your BODY section
HTML

<body onLoad="runSlideShow()">
<img id="VU" src="logojs.gif" name='SlideShow'>
</body>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








Javascript Music Player (http://www.javascriptbank.com/web-based-music-player.html/en/) - Random Text Generator (http://www.javascriptbank.com/random-text-generator.html) - Floating Image Script (http://www.javascriptbank.com/up-down-floating-image.html)

JavaScriptBank
March 22nd, 2010, 21:23
This is an interesting fireworks (http://www.javascriptbank.com/title=firework) effect with the following attributes:

+ Makes use of VML support in IE5+ to render the stars. No graphics involved.
+ Uses conditional... detail (http://www.javascriptbank.com/vml-fireworks-script.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/multimedia/vml-fireworks-script.jpg (http://www.javascriptbank.com/javascript/multimedia/events/vml-fireworks-script/preview/en/)
Demo: JavaScript VML fireworks script (http://www.javascriptbank.com/vml-fireworks-script.html/en/)


How to setup

Step 1: Place CSS below in your HEAD section
CSS

<STYLE type=text/css>BODY {
OVERFLOW-X: hidden
}
v\:* {
BEHAVIOR: url(#default#VML)
}
</STYLE>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<!--[if IE ]>
<SCRIPT language=JavaScript>
// VML fireworks script By Jacco IJzerman , j.ijzerman1@chello.nl
//Customize fireworks colors:
colors = new Array();
colors[0] = new Array('yellow', 'lime');
colors[1] = new Array('lime', 'green')
colors[2] = new Array('lime', 'blue');
colors[3] = new Array('lightyellow', 'purple');
colors[4] = new Array('lightblue', 'white');
colors[5] = new Array('blue', 'silver');
colors[6] = new Array('red', 'fuchsia');
colors[7] = new Array('yellow', 'red');

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><![endif]-->
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








JavaScript Enlarge Image (http://www.javascriptbank.com/enlarge-image-2.html/en/) - JavaScript Fading Slide Show (http://www.javascriptbank.com/fading-slide-show.html) - JavaScript Rotating Image script (http://www.javascriptbank.com/rotating-image-script.html)

JavaScriptBank
March 26th, 2010, 22:34
Text scrolls from bottom to top, pauses, then scrolls up and out of view. A JavaScript link (http://www.javascriptbank.com/javascript/link/) can be added, opening in a new window. Configuration is simple.... detail (http://www.javascriptbank.com/vertical-marquee.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/scroller/vertical-marquee.jpg (http://www.javascriptbank.com/javascript/scroller/vertical-scroller/vertical-marquee/preview/en/)
Demo: JavaScript Vertical Marquee (http://www.javascriptbank.com/vertical-marquee.html/en/)


How to setup

Step 1: Copy & Paste CSS code below in your HEAD section
CSS

<style type="text/css">
#jump_base {
overflow-y:hidden;
width: 200px;
height: 100px;
border: 2px dotted #000099;
margin: auto;
padding: 0 10px 0 10px;
font-size: .9em;
font-family: Verdana, Arial, sans-serif;
}

#jump_base a {
color: #000099;
background-color: inherit;
}

.news {
background-color: #DDDDDD;
color: inherit;
}
</style>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<script language="javascript">
// Created by: Mike Hudson :: http://www.afrozeus.com

/*
To change the values in the setupLinks function below.
You will notice there are two arrays for each of Titles and
Links. Currently there are 3 items in each array, but you can easily
expand on that by adding to the array. For example, to add a 4th record,
you would simply include the following 2 lines at the end of setupLinks
function:

arrLinks[3] = "someURL.htm";
arrTitles[3] = "Some title";
*/
function setupLinks() {
arrLinks[0] = "http://forums.webdeveloper.com/forumdisplay.php?s=&forumid=3";
arrTitles[0] = "If you have any questions, be sure to visit our forums.";
arrLinks[1] = "http://javascript.internet.com/new/";
arrTitles[1] = "Don't miss anything — check our new additions.";
arrLinks[2] = "http://www.webreference.com/programming/javascript/diaries/";
arrTitles[2] = "Want to learn JavaScript? Start at the beginning.";
}

var m_iInterval;
var m_Height;
//window.onload = wl;
var iScroll=0;

var arrLinks;
var arrTitles;

var arrCursor = 0;

var arrMax;
window.onload=wl;

function wl() {
m_iInterval = setInterval(ontimer, 10);
var base = document.getElementById("jump_base");

m_Height = base.offsetHeight;

var divi = parseInt(m_Height/5);
m_Height = divi*5;

var td1 = document.getElementById("td1");
var td2 = document.getElementById("td2");
var td3 = document.getElementById("td3");
td1.height = m_Height-5;
td2.height = m_Height-5;
td3.height = m_Height-5;

arrLinks = new Array();
arrTitles = new Array();

setupLinks();
arrMax = arrLinks.length-1;
setLink();
}
function setLink() {
var ilink = document.getElementById("jump_link");
ilink.innerHTML = arrTitles[arrCursor];
ilink.href = arrLinks[arrCursor];
}
function ontimer() {
var base = document.getElementById("jump_base");
iScroll+=5;
if (iScroll>(m_Height*2)) {
iScroll=0;
arrCursor++;
if (arrCursor>arrMax)
arrCursor=0;
setLink();
}
if (iScroll==m_Height) {
pause();
m_iInterval = setTimeout(resume, 4000);
}
base.scrollTop=iScroll;
}
function pause() {
clearInterval(m_iInterval);
}
function resume() {
m_iInterval = setInterval(ontimer, 10);
}


</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 3: Place HTML below in your BODY section
HTML

<div id="jump_base" class="news" onmouseover="pause()" onmouseout="resume()">
<table class="news">
<tr>
<td id="td1"> </td></tr>
<tr><td id = "td2" valign="middle" align="center"><a id="jump_link" href="" target="_new"></a></td></tr>

<tr><td id="td3"> </td></tr>
</table>
</div>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








Javascript Music Player (http://www.javascriptbank.com/web-based-music-player.html/en/) - Random Text Generator (http://www.javascriptbank.com/random-text-generator.html) - Floating Image Script (http://www.javascriptbank.com/up-down-floating-image.html)

JavaScriptBank
March 31st, 2010, 02:35
Handle and precess all of your form field validations (http://www.javascriptbank.com/javascript/form/validation-limitation/) using just one script. This JavaScript can verify numeric strings; monitor the detail (http://www.javascriptbank.com/jav... http://www.javascriptbank.com/javascript.images/form/extreme-form-field-validator.jpg (http://www.javascriptbank.com/javascript/form/validation-limitation/extreme-form-field-validator/preview/en/)
Demo: JavaScript Extreme Form Field Validator (http://www.javascriptbank.com/extreme-form-field-validator.html/en/)
[/CENTER]

[U]How to setup

Step 1: Use CSS code below for styling the script
CSS

<style>
#errordiv {
border: 1px solid red;
background-color: #FFAFAF;
display: none;
width: 50%;
margin: 5px;
padding: 5px;
}

.required {
background-color: #CC4444;
}

.required:focus {
background-color: #fff;
border: 1px solid #f00;
}

.checkit {
background-color: #E0E5EF;
}
</style>

Step 2: Use JavaScript code below to setup the script
JavaScript

<script type="text/javascript" src="chkform.js"></script><script type="text/javascript">
function configureValidation(f,alerttype){
f.firstname.isAlphaNumeric = true;
f.lastname.isAlphaNumeric = true;
f.email.isEmail = true;
f.phone.isPhoneNumber = true;
f.birthday.isDate = true;
f.postalcode.isEmpty = true;
f.password1.isLengthBetween = [4,255];
f.password2.isMatch = f.password1.value;
f.comments.optional = true;
var preCheck = (!f.infohtml.checked && !f.infocss.checked && !f.infojs.checked) ? errormsg[0] : null;
return validateForm(f, preCheck, 'required', alerttype);
}
</script>

Step 3: Place HTML below in your BODY section
HTML

<div>
<form action="#" method="post" onsubmit="return configureValidation(this,3)" onreset="confirm(errormsg[99])">
<table class="formtable">
<tr>
<td>First Name:</td>
<td><input class="checkit" type="text" id="First name" name="firstname" value="" class="text"></td>
</tr>
<tr>
<td>Last Name:</td>
<td><input class="checkit" type="text" id="Last name" name="lastname" value="" class="text"></td>

</tr>
<tr>
<td>Email:</td>
<td><input class="checkit" type="text" id="Email" name="email" value="" class="text"></td>
</tr>
<tr>
<td>Email Preferred:</td>
<td><select name="emailpreferred">
<option value="text">Text</option>
<option value="html">HTML</option>
<option value="flash">Flash</option>
</select></td>

</tr>
<tr>
<td>Phone: (US only) </td>
<td><input class="checkit" type="text" id="Phone" name="phone" value="000-000-0000" class="text"></td>
</tr>
<tr>
<td>Birthday:</td>
<td><input class="checkit" type="text" id="Birthday" name="birthday" value="mm-dd-yyyy" class="text"></td>
</tr>
<tr>
<td>Gender:</td>
<td>Male:<input type="radio" name="gender" value="male" class="radio" checked="checked"> Female:<input type="radio" name="gender" value="female" class="radio"></td>

</tr>
<tr>
<td>Password:</td>
<td><input class="checkit" onKeyPress="checkCapsLock( event )" id="Password" type="password" name="password1" value="" class="text"></td>
</tr>
<tr>
<td>Re-Enter:</td>
<td><input class="checkit" onKeyPress="checkCapsLock( event )" id="Password again" type="password" name="password2" value="" class="text"></td>
</tr>
<tr>
<td>Postal Code</td>
<td><input class="checkit" name="postalcode" type="text" id="Postal code" onKeyPress="javascript:checkNumber(this);" onKeyUp="javascript:checkNumber(this);"></td>
</tr>
<tr>

<td colspan="2">Select one or more of the following:</td>
</tr>
<tr>
<td colspan="2">HTML:<input type="checkbox" name="infohtml" value="true" class="checkbox"> CSS:<input type="checkbox" name="infocss" value="true" class="checkbox"> JavaScript:<input type="checkbox" name="infojs" value="true" class="checkbox"></td>
</tr>
<tr>
<td>Comments:</td>
<td><textarea id="Comment" name="comments" class="text" cols="20" rows="4"></textarea></td>
</tr>

</table>
<div id="errordiv"> </div>
<div>
<input type="submit" name="submit" value="Submit" class="button"> <input type="reset" name="reset" value="Reset" class="button"></td>
</form>
</div>

Step 4: Download files below
Files
chkform.js (http://www.javascriptbank.com/javascript/form/Extreme_Form_Field_Validator/chkform.js)







JavaScript Bookmark Page script (http://www.javascriptbank.com/bookmark-page-script.html) - JavaScript Color Wheel (http://www.javascriptbank.com/color-wheel.html) - JavaScript Image slideshow (http://www.javascriptbank.com/image-slideshow-transition.html)

JavaScriptBank
April 1st, 2010, 22:51
Your website have a sound/music system? Are you looking for a cool music player? And you are fan of Apple/iPod? If your answer is 'Yes', let embed this mp3 player script into your web page then let th... detail (http://www.javascriptbank.com/ipod-player-using-flash.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/multimedia/ipod-player-using-flash.jpg (http://www.javascriptbank.com/javascript/multimedia/sound/ipod-player-using-flash/preview/en/)
Demo: JavaScript iPod Player using Flash (http://www.javascriptbank.com/ipod-player-using-flash.html/en/)


How to setup

Step 1: must download files below
Files








[URL="http://www.javascriptbank.com/vertical-marquee.html"]JavaScript Vertical Marquee (http://www.javascriptbank.com/javascript/multimedia/iPod_Player_using_Flash/iPod_Player_using_Flash.zip) - JavaScript DHTML analog clock (http://www.javascriptbank.com/dhtml-analog-clock-ii.html/en/) - JavaScript Backwards Text (http://www.javascriptbank.com/backwards-text-2-index.html)

JavaScriptBank
April 8th, 2010, 21:52
Use this JavaScript (http://www.javascriptbank.com/javascript/) to figure out when Sunday will be in a given point of time.... detail (http://www.javascriptbank.com/calculator-for-sunday.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/time/calculator-for-sunday.jpg (http://www.javascriptbank.com/javascript/time/validation/calculator-for-sunday/preview/en/)
Demo: JavaScript Calculator for Sunday (http://www.javascriptbank.com/calculator-for-sunday.html/en/)


How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript

<script language="JavaScript">
<!-- Begin
function WeekStart(Month, Year, StartOfWeekDay) {
_Date = new Date(Year, Month, 1)
_LastDate = new Date()
_LastDate = new Date(_Date)
_LastDate.setMonth(_Date.getMonth() + 1)
_LastDate.setHours(_LastDate.getHours() - 24)
_Returns = new Array()
if (StartOfWeekDay == null) {
StartOfWeekDay = 0
}
var I = 1
while (I <= _LastDate.getDate()) {
_Date.setDate(I)
if (_Date.getDay() == StartOfWeekDay) {
_Returns[_Returns.length] = new Date(_Date)
I += 6
}
I++
}
return(_Returns)
}
// End -->
</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Copy & Paste HTML code below in your BODY section
HTML

<form>Month <select name="Month"><option value="0">Jan
</option><option value="1">Feb
</option><option value="2">Mar
</option><option value="3">Apr
</option><option value="4">May
</option><option value="5">Jun
</option><option value="6">Jul
</option><option value="7">Aug
</option><option value="8">Sep
</option><option value="9">Oct
</option><option value="10">Nov
</option><option value="11">Dec

</option></select><br>
Year <input type="text" name="Year" size="4" maxlength="4"><br>
<input type="button" value="Get Days" onclick="alert(WeekStart(document.forms[0].Month.value, document.forms[0].Year.value, 0))">
</form>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








JavaScript Make link open in new tab/window (http://www.javascriptbank.com/make-link-open-in-new-tab-window.html/en/) - JavaScript World clock (http://www.javascriptbank.com/world-clock-with-unique-display.html/en/) - circumference calculator (http://www.javascriptbank.com/circumference-calculator.html/en/)

JavaScriptBank
April 13th, 2010, 05:25
Another script to create a auto scrolling message (http://www.javascriptbank.com/javascript/text/) which move depend on scrollbars (http://www.javascriptbank.com/javascript/browser/scrollbar/).... detail (http://www.javascriptbank.com/autoscroll-div-script.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/scroller/autoscroll-div-script.jpg (http://www.javascriptbank.com/javascript/scroller/vertical-scroller/autoscroll-div-script/preview/en/)
Demo: JavaScript AutoScroll DIV script (http://www.javascriptbank.com/autoscroll-div-script.html/en/)


How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<script type="text/javascript">

var useWidth = "400px";
var speed = 250 // greater is slower;

var message = "Now is the time for all good men to come to the aid of their country. That's one small step for man, one giant leap for mankind. Ask not what your country can do for you, ask what you can do for your country. | ";

// Remember to include the vertical bar | at the end of the message(s);

var mContainer = "";
var circleMsg = "";
var prevMsg = "";
var useFloat = "";
var xV = 0;
var xL = 0;
var msgLength = 0;

function updateMessage(){

if (circleMsg == ""){circleMsg = mContainer.lastChild.data}
else {circleMsg = prevMsg}
var separatorIdx = circleMsg.lastIndexOf('|');
if (separatorIdx == -1){separatorIdx = msgLength}
circleMsg = circleMsg.substring(1,separatorIdx);
var spliceStr = message.substring(0,msgLength-separatorIdx-1);
var dispMsg = circleMsg+spliceStr;
mContainer.removeChild(mContainer.lastChild);
mContainer.appendChild(document.createTextNode(dispMsg));
prevMsg = circleMsg+'|'+spliceStr;
setTimeout("updateMessage()",speed);
}

function startCrawl(){

mContainer.appendChild(document.createTextNode(message))
setTimeout("updateMessage()",3000); // delay before crawl start;
}

function stayHome(){

var nV = 0;
var nL = 0;
if(!document.body.scrollTop)
{
nV = document.documentElement.scrollTop;
nL = document.documentElement.scrollLeft;
}
else {
nV = document.body.scrollTop;
nL = document.body.scrollLeft;
}
if (nV == 0){window.scrollBy(0,1)}
useFloat.style.top = nV+xV+"px";
useFloat.style.left = nL+xL+"px";
setTimeout("stayHome()",50);
}

window.onload=function(){

mContainer = document.getElementById('crawl');
document.getElementById('isFloat').style.width = useWidth;
msgLength = message.length;
useFloat = document.getElementById('isFloat');
useFloat.style.left = ((screen.width-30)/2)-(parseInt(useWidth)/2)+"px";
xV = useFloat.offsetTop;
xL = useFloat.offsetLeft;
stayHome();
startCrawl();
}

</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Copy & Paste HTML code below in your BODY section
HTML

<Div id='isFloat' style='position:absolute;bottom:20px;overflow:hidden;height: 28px;border:solid black 1px;font-size:14pt;background-color:lightyellow;color:darkblue'>

<Div id='crawl' style='padding:3px;white-space:nowrap'></Div>

</Div>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








JavaScript Vertical Marquee (http://www.javascriptbank.com/vertical-marquee.html) - JavaScript DHTML analog clock (http://www.javascriptbank.com/dhtml-analog-clock-ii.html/en/) - JavaScript Backwards Text (http://www.javascriptbank.com/backwards-text-2-index.html)

JavaScriptBank
April 15th, 2010, 12:18
Need to create a F.A.Q (http://www.javascriptbank.com/title=FAQ) for your Web site? Use this JavaScript (http://www.javascriptbank.com/javascript/) to hide/reveal content on a Web page. Keep your long documents short.... detail (http://www.javascriptbank.com/faq-drop-down-script.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/utility/faq-drop-down-script.jpg (http://www.javascriptbank.com/javascript/utility/faq-drop-down-script/preview/en/)
Demo: JavaScript FAQ Drop Down script (http://www.javascriptbank.com/faq-drop-down-script.html/en/)


How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<script type="text/javascript">
<!-- Begin
// Created by: Fang :: http://-------.com/7v7l8

function toggle(obj) {
// Moz. or IE
var sibling=(obj.nextSibling.nodeType==3)? obj.nextSibling.nextSibling : obj.nextSibling;
// hide or show
if(sibling.style.display=='' || sibling.style.display=='block') {
sibling.style.display='none';
obj.firstChild.firstChild.data='+';
}
else {
sibling.style.display='block';
obj.firstChild.firstChild.data='-';
}
}
//
function initCollapse() {
var oDT=document.getElementById('content').getElementsByTagName( 'dt');
for (var i=0; i < oDT.length; i++) {
oDT[i].onclick=function() {toggle(this)};
var oSpan=document.createElement('span');
var sign=document.createTextNode('+');
oSpan.appendChild(sign);
oDT[i].insertBefore(oSpan, oDT[i].firstChild);
oSpan.style.fontFamily='monospace';
oSpan.style.paddingRight='0.5em';
oDT[i].style.cursor='pointer';
toggle(oDT[i]);
}
oDT=null;
}
window.onload=function() {if(document.getElementById && document.createElement) {initCollapse();}}
//-->
</script>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->


Step 2: Copy & Paste HTML code below in your BODY section
HTML

<dl id="content">
<dt>This is Question #1 <em class="sm">[click here]</em></dt>
<dd>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation
ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
Duis autem vel eum iriure dolor in hendrerit in.<br><br></dd>
<dt>This is Question #2 <em class="sm">[click here]</em></dt>
<dd>Ma quande lingues coalesce, li grammatica del resultant lingue es plu
simplic e regulari quam ti del coalescent lingues. Li nov lingua franca
va esser plu simplic e regulari quam li existent Europan lingues. It va
esser tam simplic quam Occidental: in fact, it va esser Occidental. A un
Angleso.<br><br></dd>
<dt>This is Question #3 <em class="sm">[click here]</em></dt>

<dd>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation
ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
Duis autem vel eum iriure dolor in hendrerit in.</dd>
</dl>
</div>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








JavaScript Vertical Marquee (http://www.javascriptbank.com/vertical-marquee.html) - JavaScript DHTML analog clock (http://www.javascriptbank.com/dhtml-analog-clock-ii.html/en/) - JavaScript Backwards Text (http://www.javascriptbank.com/backwards-text-2-index.html)

nunewnew
April 20th, 2010, 00:32
This is an interesting fireworks action with the following attributes:

Plus uses VML support in IE5 + to the stars. No graphics involved.
+ Using a conditional ... detail on JavaScriptBank.com - 2,000 + free JavaScript code


Demo: JavaScript VML fireworks script

How do

Step 1 : The place below the CSS in the HEAD section
CSS
Code:
BODY (OVERFLOW-X: hidden) V: * (BEHAVIOR: URL (by default # # VML)) Step 2 : Copy and Paste the JavaScript code into your HEAD section
JavaScript
Code:





JavaScript Zoom - JavaScript Fading Slideshow - JavaScript rotating image script thx very much

JavaScriptBank
April 20th, 2010, 04:42
The dynamic animation JavaScript code is fastest and simpliest way to set up a splash screen effect, thanks to this DHTML script (http://www.javascriptbank.com/title=DHTML)! Users will be ab... detail (http://www.javascriptbank.com/dynamic-html-splash-screen.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/browser/dynamic-html-splash-screen.jpg (http://www.javascriptbank.com/javascript/browser/page-effect/dynamic-html-splash-screen/preview/en/)
Demo: JavaScript Dynamic HTML Splash Screen (http://www.javascriptbank.com/dynamic-html-splash-screen.html/en/)


How to setup

Step 1: Place HTML below in your BODY section
HTML

<DIV id=splashcontainer style="POSITION: absolute; WIDTH: 350px"></DIV><LAYER
id=splashcontainerns width="450"></LAYER>
<SCRIPT>
/*
Dynamic Splash Screen effect- © Dynamic Drive (www.dynamicdrive.com) Updated: 00/12/18
For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use,
Visit http://dynamicdrive.com
*/

//Specify the paths of the images to be used in the splash screen, if any.
//If none, empty out array (ie: preloadimages=new Array())
var preloadimages=new Array("bongbong.gif","bongbong.gif")
//configure delay in miliseconds between each message (default: 2 seconds)
var intervals=2000
//configure destination URL
var targetdestination="http://javascriptbank.com"

//configure messages to be displayed
//If message contains apostrophe('), backslash them (ie: "I'm fine")

var splashmessage=new Array()
var openingtags='<font face="Arial" size="4">'
splashmessage[0]='<img src="bongbong.gif"> JavaScriptBank.com <img src="bongbong.gif">'
splashmessage[1]='Bank of free JavaScript'
splashmessage[2]='over 2000+ free JavaScript code'
splashmessage[3]='please wait...'


var closingtags='</font>'

//Do not edit below this line (besides HTML code at the very bottom)

var i=0

var ns4=document.layers?1:0
var ie4=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
var theimages=new Array()

//preload images
if (document.images){
for (p=0;p<preloadimages.length;p++){
theimages[p]=new Image()
theimages[p].src=preloadimages[p]
}
}

function displaysplash(){
if (i<splashmessage.length){
sc_cross.style.visibility="hidden"
sc_cross.innerHTML='<b><center>'+openingtags+splashmessage[i]+closingtags+'</center></b>'
sc_cross.style.left=ns6?parseInt(window.pageXOffset)+parseIn t(window.innerWidth)/2-parseInt(sc_cross.style.width)/2 : document.body.scrollLeft+document.body.clientWidth/2-parseInt(sc_cross.style.width)/2
sc_cross.style.top=ns6?parseInt(window.pageYOffset)+parseInt (window.innerHeight)/2-sc_cross.offsetHeight/2 : document.body.scrollTop+document.body.clientHeight/2-sc_cross.offsetHeight/2
sc_cross.style.visibility="visible"
i++
}
else{
window.location=targetdestination
return
}
setTimeout("displaysplash()",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 (ie4||ns6){
sc_cross=ns6?document.getElementById("splashcontainer"):document.all.splashcontainer
displaysplash()
}
else if (ns4){
sc_ns=document.splashcontainerns
sc_ns.visibility="show"
displaysplash_ns()
}
else
window.location=targetdestination
}
window.onload=positionsplashcontainer

</SCRIPT>







JavaScript Line Graph script (http://www.javascriptbank.com/line-graph-script-index.html) - JavaScript Virtual Keyboard (http://www.javascriptbank.com/virtualkeyboard-index.html) - JavaScript Horizontal Slider (http://www.javascriptbank.com/horizontal-slider-javascript-v2-2.html)

nunewnew
April 20th, 2010, 05:37
wow new update, thank again

JavaScriptBank
April 23rd, 2010, 04:31
One of the many cursor (http://www.javascriptbank.com/javascript/very nice mouse/) codes in our JavaScript library, this one creates dancing stars animating around your pointers mouse. This cur... detail (http://www.javascriptbank.com/=cursor move) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/mouse/dancing-animation-stars-cursor.jpg (http://www.javascriptbank.com/javascript/mouse/trailer/dancing-animation-stars-cursor/preview/en/)
Demo: JavaScript Dancing Animation Stars Cursor (http://www.javascriptbank.com/dancing-animation-stars-cursor.html/en/)


[U]How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<script language="JavaScript">
<!--
/*
Dancing Stars cursor (Submitted by Kurt at kurt.grigg@virgin.net)
Modified and permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

if (document.all){
document.write('<div id="starsDiv" style="position:absolute;top:0px;left:0px">')
for (xy=0;xy<7;xy++)
document.write('<div style="position:relative;width:3px;height:3px;background:#FFFF00;fo nt-size:2px;visibility:visible"></div>')
document.write('</div>')
}

if (document.layers)
{window.captureEvents(Event.MOUSEMOVE);}
var yBase = 200;
var xBase = 200;
var yAmpl = 10;
var yMax = 40;
var step = .2;
var ystep = .5;
var currStep = 0;
var tAmpl=1;
var Xpos = 1;
var Ypos = 1;
var i = 0;
var j = 0;

if (document.all)
{
function MoveHandler(){
Xpos = document.body.scrollLeft+event.x;
Ypos = document.body.scrollTop+event.y;
}
document.onmousemove = MoveHandler;
}

else if (document.layers)
{
function xMoveHandler(evnt){
Xpos = evnt.pageX;
Ypos = evnt.pageY;
}
window.onMouseMove = xMoveHandler;
}



function animateLogo() {
if (document.all)
{
yBase = window.document.body.offsetHeight/4;
xBase = window.document.body.offsetWidth/4;
}
else if (document.layers)
{
yBase = window.innerHeight/4 ;
xBase = window.innerWidth/4;
}

if (document.all)
{
var totaldivs=document.all.starsDiv.all.length
for ( i = 0 ; i < totaldivs ; i++ )
{
var tempdiv=document.all.starsDiv.all[i].style
tempdiv.top = Ypos + Math.cos((20*Math.sin(currStep/20))+i*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
tempdiv.left = Xpos + Math.sin((20*Math.sin(currStep/20))+i*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
}
}

else if (document.layers)
{
for ( j = 0 ; j < 7 ; j++ )
{
var templayer="a"+j
document.layers[templayer].top = Ypos + Math.cos((20*Math.sin(currStep/20))+j*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
document.layers[templayer].left =Xpos + Math.sin((20*Math.sin(currStep/20))+j*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
}
}
currStep += step;
setTimeout("animateLogo()", 15);
}
animateLogo();
// -->
</script>

Step 2: Copy & Paste HTML code below in your BODY section
HTML

<LAYER NAME="a0" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a1" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a2" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a3" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a4" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a5" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a6" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>







JavaScript Countdown Timer (http://www.javascriptbank.com/javascript-countdown-timer.html/en/) - JavaScript Currency Format (http://www.javascriptbank.com/currency-format-script.html) - JavaScript Format Phone Number (http://www.javascriptbank.com/format-phone-number.html)

JavaScriptBank
April 26th, 2010, 20:48
From this super nice JavaScript analog clock, you have more than 20 layouts of analog clock to display the time (http://www.javascriptbank.com/javascript/time/) on your web pages. This JavaScript analog clock has enou... detail (http://www.javascriptbank.com/coolclock-super-nice-javascript-analog-clock.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/time/coolclock-super-nice-javascript-analog-clock.jpg (http://www.javascriptbank.com/javascript/time/clock-time-date/coolclock-super-nice-javascript-analog-clock/preview/en/)
Demo: JavaScript CoolClock - Super nice Javascript Analog Clock (http://www.javascriptbank.com/coolclock-super-nice-javascript-analog-clock.html/en/)


How to setup

Step 1: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<!--[if IE]><script type="text/javascript" src="excanvas.js"></script><![endif]-->
<script src="coolclock.js" type="text/javascript"></script>
<script src="moreskins.js" type="text/javascript"></script>

Step 2: Place HTML below in your BODY section
HTML

<table align="center">
<tbody><tr><td rowspan="2">
<canvas style="width: 170px; height: 170px;" height="170" width="170" id="c1" class="CoolClock"></canvas>
<br>
<canvas style="width: 170px; height: 170px;" height="170" width="170" id="c2" class="CoolClock:chunkySwiss"></canvas>
<br>
<canvas style="width: 170px; height: 170px;" height="170" width="170" id="c4" class="CoolClock:machine"></canvas>
</td><td>
<canvas style="width: 380px; height: 380px;" height="380" width="380" id="c5" class="CoolClock:fancy:190"></canvas>
</td></tr><tr><td align="center">
<table><tbody><tr>
<td align="center">New York<br><canvas style="width: 60px; height: 60px;" height="60" width="60" id="c6" class="CoolClock:chunkySwiss:30:noSeconds:-4 leftRightPad"></canvas></td>
<td align="center">London<br><canvas style="width: 60px; height: 60px;" height="60" width="60" id="c7" class="CoolClock::30:noSeconds:+1 leftRightPad"></canvas></td>
<td align="center">Townsville<br><canvas style="width: 60px; height: 60px;" height="60" width="60" id="c8" class="CoolClock:fancy:30:noSeconds:+10 leftRightPad"></canvas></td>
</tr></tbody></table>
</td></tr>
</tbody></table>

Step 3: downloads
Files
coolclock.js (http://www.javascriptbank.com/javascript/time/CoolClock-Super_nice_Javascript_Analog_Clock/coolclock.js)
excanvas.js (http://www.javascriptbank.com/javascript/time/CoolClock-Super_nice_Javascript_Analog_Clock/excanvas.js)
moreskins.js (http://www.javascriptbank.com/javascript/time/CoolClock-Super_nice_Javascript_Analog_Clock/moreskins.js)







JavaScript Vertical Marquee (http://www.javascriptbank.com/vertical-marquee.html) - JavaScript DHTML analog clock (http://www.javascriptbank.com/dhtml-analog-clock-ii.html/en/) - JavaScript Backwards Text (http://www.javascriptbank.com/backwards-text-2-index.html)

JavaScriptBank
May 4th, 2010, 19:16
One of the many cursor (http://www.javascriptbank.com/javascript/very nice mouse/) codes in our JavaScript library, this one creates dancing stars animating around your pointers mouse. This cur... detail (http://www.javascriptbank.com/=cursor move) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/mouse/dancing-animation-stars-cursor.jpg (http://www.javascriptbank.com/javascript/mouse/trailer/dancing-animation-stars-cursor/preview/en/)
Demo: JavaScript Dancing Animation Stars Cursor (http://www.javascriptbank.com/dancing-animation-stars-cursor.html/en/)


[U]How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript

<script language="JavaScript">
<!--
/*
Dancing Stars cursor (Submitted by Kurt at kurt.grigg@virgin.net)
Modified and permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

if (document.all){
document.write('<div id="starsDiv" style="position:absolute;top:0px;left:0px">')
for (xy=0;xy<7;xy++)
document.write('<div style="position:relative;width:3px;height:3px;background:#FFFF00;fo nt-size:2px;visibility:visible"></div>')
document.write('</div>')
}

if (document.layers)
{window.captureEvents(Event.MOUSEMOVE);}
var yBase = 200;
var xBase = 200;
var yAmpl = 10;
var yMax = 40;
var step = .2;
var ystep = .5;
var currStep = 0;
var tAmpl=1;
var Xpos = 1;
var Ypos = 1;
var i = 0;
var j = 0;

if (document.all)
{
function MoveHandler(){
Xpos = document.body.scrollLeft+event.x;
Ypos = document.body.scrollTop+event.y;
}
document.onmousemove = MoveHandler;
}

else if (document.layers)
{
function xMoveHandler(evnt){
Xpos = evnt.pageX;
Ypos = evnt.pageY;
}
window.onMouseMove = xMoveHandler;
}



function animateLogo() {
if (document.all)
{
yBase = window.document.body.offsetHeight/4;
xBase = window.document.body.offsetWidth/4;
}
else if (document.layers)
{
yBase = window.innerHeight/4 ;
xBase = window.innerWidth/4;
}

if (document.all)
{
var totaldivs=document.all.starsDiv.all.length
for ( i = 0 ; i < totaldivs ; i++ )
{
var tempdiv=document.all.starsDiv.all[i].style
tempdiv.top = Ypos + Math.cos((20*Math.sin(currStep/20))+i*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
tempdiv.left = Xpos + Math.sin((20*Math.sin(currStep/20))+i*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + i*25)/10);
}
}

else if (document.layers)
{
for ( j = 0 ; j < 7 ; j++ )
{
var templayer="a"+j
document.layers[templayer].top = Ypos + Math.cos((20*Math.sin(currStep/20))+j*70)*yBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
document.layers[templayer].left =Xpos + Math.sin((20*Math.sin(currStep/20))+j*70)*xBase*(Math.sin(10+currStep/10)+0.2)*Math.cos((currStep + j*25)/10);
}
}
currStep += step;
setTimeout("animateLogo()", 15);
}
animateLogo();
// -->
</script>

Step 2: Copy & Paste HTML code below in your BODY section
HTML

<LAYER NAME="a0" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a1" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a2" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a3" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a4" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a5" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>
<LAYER NAME="a6" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FFFF00" CLIP="0,0,3,3"></LAYER>







JavaScript Bookmark Page script (http://www.javascriptbank.com/bookmark-page-script.html) - JavaScript Color Wheel (http://www.javascriptbank.com/color-wheel.html) - JavaScript Image slideshow (http://www.javascriptbank.com/image-slideshow-transition.html)

JavaScriptBank
May 7th, 2010, 19:55
This image (http://www.javascriptbank.com/javascript/image/) rotation (http://www.javascriptbank.com/javascript/image/rotation/) system creates a dissolving effect for the transition phase. Great for banners, picture-presentations and... detail (http://www.javascriptbank.com/image-rotation-with-new-transition-and-dissolving-effect.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/image/image-rotation-with-new-transition-and-dissolving-effect.jpg (http://www.javascriptbank.com/javascript/image/rotation/image-rotation-with-new-transition-and-dissolving-effect/preview/en/)
Demo: JavaScript Image Rotation with new transition and dissolving effect (http://www.javascriptbank.com/image-rotation-with-new-transition-and-dissolving-effect.html/en/)


How to setup

Step 1: Use CSS code below for styling the script
CSS

<STYLE>
.spanstyle {
LEFT: 0px; POSITION: absolute; width: 100%; text-align: center;
}
</STYLE>

Step 2: Use JavaScript code below to setup the script
JavaScript

<SCRIPT>
<!-- Beginning of JavaScript -
// CONFIGURATION:
// 1. Copy the two script-blocks:
// Paste the first script-block inside the head-section of your HTML-file.
// Insert the second script-block into the body-section.
// 2. Copy the style-block and paste it into the head-section of your HTML-file.
// 3. Put your images into the same directory as the HTML-file.
// You may add as many images as you like.
// 4. Insert 'onLoad="checkbrowser()"' into the body-tag.
// 5. Configure the variables below:

// The width of your images (pixels)
var imgwidth=800

// The height of your images (pixels)
var imgheight=250

// The name of your images. You may add as many images as you like.
var imgname=new Array()
imgname[0]="logojs.gif"
imgname[1]="photo1.jpg"
imgname[2]="photo2.jpg"
imgname[3]="photo3.jpg"

// This block will preload your images. Do not edit this block.
var imgpreload=new Array()
for (i=0;i<=imgname.length-1;i++) {
imgpreload[i]=new Image()
imgpreload[i].src=imgname[i]
}

// Where should those images be linked to?
// Add an URL for each image.
// If you don't want to add an URL just write '#' instead of
// the URL, see sample imgurl[2].
var imgurl=new Array()
imgurl[0]="http://javascriptbank.com"
imgurl[1]="http://www.javascriptbank.com"
imgurl[2]="http://javascriptbank.com"
imgurl[3]="http://www.javascriptbank.com"

// Final horizontal position of the image: distance to the left margin of the window
var x_finalpos=30

// Final vertical position of the image: distance to the top margin of the window
var y_finalpos=30

// Number of sliced cells (the higher this number the slower the visual effect)
var x_slices=10

// Number of sliced rows (the higher this number the slower the visual effect)
var y_slices=8

// Standstill between the images (microseconds)
var pause=2500

// Do not change the variables below
var xy_slices=x_slices*y_slices
var randomorder=new Array()
for (i=0;i<=xy_slices-1;i++) {
randomorder[i]=i
}

var speed=20
var i_images=0
var width_slice=Math.floor(imgwidth/x_slices)
var height_slice=Math.floor(imgheight/y_slices)

var cliptop=0
var clipbottom=height_slice
var clipleft=0
var clipright=width_slice
var spancounter=0
var x_random=new Array()
var y_random=new Array()
var max_explsteps=15
var i_explsteps=0

function checkbrowser() {
if (document.all) {
initiate()
}
if (document.layers) {
rotatenetscape()
}
}

function initiate() {
if (document.all) {
spancounter=0
for (i=0;i<=y_slices-1;i++) {
for (ii=0;ii<=x_slices-1;ii++) {
var thisspan=eval("document.all.span"+spancounter+".style")
thisspan.posLeft=x_finalpos
thisspan.posTop=y_finalpos
thisspan.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
clipleft+=width_slice
clipright+=width_slice
spancounter++
}
clipleft=0
clipright=width_slice
cliptop+=height_slice
clipbottom+=height_slice
}
for (i=0;i<=xy_slices-1;i++) {
var thisspan=eval("span"+i)
thisspan.innerHTML="<a href='"+imgurl[i_images]+"'><img src='"+imgname[i_images]+"' border='0'></a>"
}
var timer=setTimeout("changeimage()",pause)
}
}

function dissolveimg() {
if (i_loop<=xy_slices-1) {
var thisspan=eval("span"+randomorder[i_loop])
thisspan.innerHTML="<a href='"+imgurl[i_images]+"'><img src='"+imgname[i_images]+"' border='0'></a>"
i_loop++
var timer=setTimeout("dissolveimg()",speed)
}
else {
clearTimeout(timer)
var timer=setTimeout("changeimage()",pause)
}
}

function changeimage() {
getrandomorder(xy_slices)
i_loop=0
i_images++
if (i_images>=imgname.length) {i_images=0}
dissolveimg()
}

function getrandomorder(range) {
for (i=0;i<=range;i++) {
var firstvalue= Math.floor(range*Math.random())
var secondvalue= Math.floor(range*Math.random())
var cachevalue=randomorder[firstvalue]
randomorder[firstvalue]=randomorder[secondvalue]
randomorder[secondvalue]=cachevalue
}
}

function rotatenetscape() {
document.imgcontainer1.document.write("<a href='"+imgurl[i_images]+"'><img src='"+imgname[i_images]+"' border='0'></a>")
document.imgcontainer1.document.close()
i_images++
if (i_images>imgname.length-1) {i_images=0}
var timer=setTimeout("rotatenetscape()",pause)
}

// - End of JavaScript - -->
</SCRIPT>

Step 3: Copy & Paste HTML code below in your BODY section
HTML

<BODY onload=checkbrowser()>
<SCRIPT>
<!-- Beginning of JavaScript -
if (document.all) {
for (i=0;i<=y_slices-1;i++) {
for (ii=0;ii<=x_slices-1;ii++) {
document.write("<div id='span"+spancounter+"' class='spanstyle'>")
document.write("</div>")
spancounter++
}
}
}

if (document.layers) {
document.write("<div id='imgcontainer1' class='spanstyle'>")
document.write("</div>")
document.close()
document.imgcontainer1.left=x_finalpos
document.imgcontainer1.top=y_finalpos
}
// - End of JavaScript - -->
</SCRIPT>
</BODY>







Command to print web page in javascript (http://www.javascriptbank.com/window-print-method.html) - Javascript Time Picker (http://www.javascriptbank.com/time-picker-with-child-window.html) - JavaScript Go To URL Box (http://www.javascriptbank.com/go-to-url.html)

JavaScriptBank
May 10th, 2010, 20:21
Just a neat little trick, cool cursors mouse, a display of date/time around the animated mouse.... detail (http://www.javascriptbank.com/trailing-clock-cursor.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/mouse/trailing-clock-cursor.jpg (http://www.javascriptbank.com/javascript/mouse/trailer/trailing-clock-cursor/preview/en/)
Demo: JavaScript Trailing Clock Cursor (http://www.javascriptbank.com/trailing-clock-cursor.html/en/)


How to setup

Step 1: Use JavaScript code below to setup the script
JavaScript

<SCRIPT>
dCol='BLUE';//date colour.
fCol='RED';//face colour.
sCol='BLUE';//seconds colour.
mCol='BLUE';//minutes colour.
hCol='RED';//hours colour.
ClockHeight=40;
ClockWidth=40;
ClockFromMouseY=0;
ClockFromMouseX=100;

//Alter nothing below! Alignments will be lost!

d=new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY");
m=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER");
date=new Date();
day=date.getDate();
year=date.getYear();
if (year < 2000) year=year+1900;
TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
D=TodaysDate.split('');
H='...';
H=H.split('');
M='....';
M=M.split('');
S='.....';
S=S.split('');
Face='1 2 3 4 5 6 7 8 9 10 11 12';
font='Arial';
size=1;
speed=0.6; //dieu chinh toc do di chuyen theo mouse
ns=(document.layers);
ie=(document.all);
Face=Face.split(' ');
n=Face.length;
a=size*10;
ymouse=0;
xmouse=0;
scrll=0;
props="<font face="+font+" size="+size+" color="+fCol+"><B>";
props2="<font face="+font+" size="+size+" color="+dCol+"><B>";
Split=360/n;
Dsplit=360/D.length;
HandHeight=ClockHeight/4.5
HandWidth=ClockWidth/4.5
HandY=-7; //di chuyen vi tri kim theo chieu doc
HandX=-2.5; // di chuyen vi tri kim theo chieu ngang
scrll=0;
step=0.06; // dieu chinh toc do xoay cua vong ngay thang, so cang nho toc do cang cham, 0: khong xoay
currStep=0; //xoay diem dat cua vong ngay thang
y=new Array();x=new Array();Y=new Array();X=new Array();
for (i=0; i < n; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0}
Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();
for (i=0; i < D.length; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0}
if (ns){
for (i=0; i < D.length; i++)
document.write('<layer name="nsDate'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D[i]+'</font></center></layer>');
for (i=0; i < n; i++)
document.write('<layer name="nsFace'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face[i]+'</font></center></layer>');
for (i=0; i < S.length; i++)
document.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+sCol+'><center><b>'+S[i]+'</b></center></font></layer>');
for (i=0; i < M.length; i++)
document.write('<layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+mCol+'><center><b>'+M[i]+'</b></center></font></layer>');
for (i=0; i < H.length; i++)
document.write('<layer name=nsHours'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+hCol+'><center><b>'+H[i]+'</b></center></font></layer>');
}
if (ie){
document.write('<div id="Od" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < D.length; i++)
document.write('<div id="ieDate" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';te xt-align:center">'+props2+D[i]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Of" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < n; i++)
document.write('<div id="ieFace" style="position:absolute;top:0px;left:0;height:'+a+';width:'+a+';te xt-align:center">'+props+Face[i]+'</B></font></div>');
document.write('</div></div>');
document.write('<div id="Oh" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < H.length; i++)
document.write('<div id="ieHours" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+hCol+';text-align:center;font-weight:bold">'+H[i]+'</div>');
document.write('</div></div>');
document.write('<div id="Om" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < M.length; i++)
document.write('<div id="ieMinutes" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+mCol+';text-align:center;font-weight:bold">'+M[i]+'</div>');
document.write('</div></div>')
document.write('<div id="Os" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i=0; i < S.length; i++)
document.write('<div id="ieSeconds" style="position:absolute;width:16px;height:16px;font-family:Arial;font-size:16px;color:'+sCol+';text-align:center;font-weight:bold">'+S[i]+'</div>');
document.write('</div></div>')
}
(ns)?window.captureEvents(Event.MOUSEMOVE):0;
function Mouse(evnt){
ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY;
xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX;
}
(ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse;
function ClockAndAssign(){
time = new Date ();
secs = time.getSeconds();
sec = -1.57 + Math.PI * secs/30;
mins = time.getMinutes();
min = -1.57 + Math.PI * mins/30;
hr = time.getHours();
hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360;
if (ie){
Od.style.top=window.document.body.scrollTop;
Of.style.top=window.document.body.scrollTop;
Oh.style.top=window.document.body.scrollTop;
Om.style.top=window.document.body.scrollTop;
Os.style.top=window.document.body.scrollTop;
}
for (i=0; i < n; i++){
var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style;
F.top=y[i] + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;
F.left=x[i] + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180);
}
for (i=0; i < H.length; i++){
var HL=(ns)?document.layers['nsHours'+i]:ieHours[i].style;
HL.top=y[i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll;
HL.left=x[i]+HandX+(i*HandWidth)*Math.cos(hrs);
}
for (i=0; i < M.length; i++){
var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes[i].style;
ML.top=y[i]+HandY+(i*HandHeight)*Math.sin(min)+scrll;
ML.left=x[i]+HandX+(i*HandWidth)*Math.cos(min);
}
for (i=0; i < S.length; i++){
var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds[i].style;
SL.top=y[i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll;
SL.left=x[i]+HandX+(i*HandWidth)*Math.cos(sec);
}
for (i=0; i < D.length; i++){
var DL=(ns)?document.layers['nsDate'+i]:ieDate[i].style;
DL.top=Dy[i] + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/180)+scrll;
DL.left=Dx[i] + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/180);
}
currStep-=step;
}
function Delay(){
scrll=(ns)?window.pageYOffset:0;
Dy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed);
Dx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed);
for (i=1; i < D.length; i++){
Dy[i]=Math.round(DY[i]+=(Dy[i-1]-DY[i])*speed);
Dx[i]=Math.round(DX[i]+=(Dx[i-1]-DX[i])*speed);
}
y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed);
x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed);
for (i=1; i < n; i++){
y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed);
x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed);
}
ClockAndAssign();
setTimeout('Delay()',20);
}
if (ns||ie)window.onload=Delay;

</SCRIPT>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->







JavaScript Line Graph script (http://www.javascriptbank.com/line-graph-script-index.html) - JavaScript Virtual Keyboard (http://www.javascriptbank.com/virtualkeyboard-index.html) - JavaScript Horizontal Slider (http://www.javascriptbank.com/horizontal-slider-javascript-v2-2.html)

JavaScriptBank
May 12th, 2010, 21:27
It'll be very easy to view the type of this notification if you're using <i>GMail</i> one the web based environment. Today, the author of this post guides you to build a simple application for display... detail (http://www.javascriptbank.com/how-to-create-ajax-notifications-with-jquery.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/article/how-to-create-ajax-notifications-with-jquery.jpg (http://www.javascriptbank.com/javascript/article/how-to/how-to-create-ajax-notifications-with-jquery/preview/en/)
Demo: JavaScript How to create AJAX Notifications with jQuery (http://www.javascriptbank.com/how-to-create-ajax-notifications-with-jquery.html/en/)


How to setup







JavaScript Vertical Marquee (http://www.javascriptbank.com/vertical-marquee.html) - JavaScript DHTML analog clock (http://www.javascriptbank.com/dhtml-analog-clock-ii.html/en/) - JavaScript Backwards Text (http://www.javascriptbank.com/backwards-text-2-index.html)

JavaScriptBank
May 13th, 2010, 06:18
Use this JavaScript instead of frames. When a visitor clicks on a specific link (http://www.javascriptbank.com/javascript/link/), the content of that link is inserted into the page without a refresh. When a page doesn... detail (http://www.javascriptbank.com/ajax-navigation-menu.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/ajax/ajax-navigation-menu.jpg (http://www.javascriptbank.com/javascript/ajax/ajax-navigation-menu/preview/en/)
Demo: JavaScript AJAX Navigation Menu (http://www.javascriptbank.com/ajax-navigation-menu.html/en/)


How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript

<script language="javascript">

// Created by: Michael :: http://www.posters-bestellen.nl

var please_wait = null;

function open_url(url, target) {
if ( ! document.getElementById) {
return false;
}

if (please_wait != null) {
document.getElementById(target).innerHTML = please_wait;
}

if (window.ActiveXObject) {
link = new ActiveXObject("Microsoft.XMLHTTP");
} else if (window.XMLHttpRequest) {
link = new XMLHttpRequest();
}

if (link == undefined) {
return false;
}
link.onreadystatechange = function() { response(url, target); }
link.open("GET", url, true);
link.send(null);
}

function response(url, target) {
if (link.readyState == 4) {
document.getElementById(target).innerHTML = (link.status == 200) ? link.responseText : "Ooops!! A broken link! Please contact the webmaster of this website ASAP and give him the fallowing errorcode: " + link.status;
}
}

function set_loading_message(msg) {
please_wait = msg;
}
</script>

Step 2: Place HTML below in your BODY section
HTML

<script type="text/javascript">
<!--
/* This script and many more are available free online at
Created by: Michael :: http://www.posters-bestellen.nl */

set_loading_message("Please wait while the page is opening....");
//-->

</script>
<table>
<tr>
<td valign=top width=150>
<H5>My Navagation links</H5>
<a href="javascript:void(0)" onclick="open_url('page-1.html','my_site_content');">
Go to page 1</a><br>
<a href="javascript:void(0)" onclick="open_url('page-2.html','my_site_content');">
Go to page 2</a><br>
<a href="javascript:void(0)" onclick="open_url('page-3.html','my_site_content');">
Go to page 3</a><br>
<a href="javascript:void(0)" onclick="open_url('page-4.html','my_site_content');">
Go to page 4</a><br>

<a href="javascript:void(0)" onclick="open_url('xxxx.html','my_site_content');">
Broken Link</a><br>
</td>
<td valign=top>
<div id="my_site_content">
</div>
</td>
</tr>
</table>







JavaScript Enlarge Image (http://www.javascriptbank.com/enlarge-image-2.html/en/) - JavaScript Fading Slide Show (http://www.javascriptbank.com/fading-slide-show.html) - JavaScript Rotating Image script (http://www.javascriptbank.com/rotating-image-script.html)

JavaScriptBank
May 15th, 2010, 10:51
Enhancing image presentation (http://www.javascriptbank.com/javascript/image/slideshow/) on your website with this image rotator plus smooth dynamic motion (http://www.javascriptbank.com/=motion) (fade-in-fade-out). A very great anima... detail (http://www.javascriptbank.com/dhtml-fading-animation-image.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/image/dhtml-fading-animation-image.jpg (http://www.javascriptbank.com/javascript/image/rotation/dhtml-fading-animation-image/preview/en/)
Demo: JavaScript DHTML Fading Animation Image (http://www.javascriptbank.com/dhtml-fading-animation-image.html/en/)


How to setup

Step 1: Place JavaScript below in your HEAD section
JavaScript

<SCRIPT language=javaScript>
<!-- Beginning of JavaScript -

sandra0 = new Image();
sandra0.src = "photo1.jpg";

sandra1 = new Image();
sandra1.src = "photo2.jpg";

sandra2 = new Image();
sandra2.src = "photo3.jpg";

var i_strngth=1
var i_image=0

var imageurl = new Array()
imageurl[0] ="photo1.jpg"
imageurl[1] ="photo2.jpg"
imageurl[2] ="photo3.jpg"


function showimage() {
if(document.all) {
if (i_strngth <=110) {
testimage.innerHTML="<img style='filter:alpha(opacity="+i_strngth+")' src="+imageurl[i_image]+" border=0>";
i_strngth=i_strngth+10
var timer=setTimeout("showimage()",100)
}
else {
clearTimeout(timer)
var timer=setTimeout("hideimage()",1000)
}
}

if(document.layers) {
clearTimeout(timer)
document.testimage.document.write("<img src="+imageurl[i_image]+" border=0>")
document.close()
i_image++
if (i_image >= imageurl.length) {i_image=0}
var timer=setTimeout("showimage()",2000)

}
}


function hideimage() {
if (i_strngth >=-10) {
testimage.innerHTML="<img style='filter:alpha(opacity="+i_strngth+")' src="+imageurl[i_image]+" border=0>";
i_strngth=i_strngth-10
var timer=setTimeout("hideimage()",100)
}
else {
clearTimeout(timer)
i_image++
if (i_image >= imageurl.length) {i_image=0}
i_strngth=1
var timer=setTimeout("showimage()",500)
}
}


// - End of JavaScript - -->
</SCRIPT>

Step 2: Place HTML below in your BODY section
HTML

<BODY onload=showimage()>
<DIV id=mainbod style="POSITION: relative; VISIBILITY: visible"></DIV>

<DIV id=testimage style="POSITION: relative; VISIBILITY: visible"></DIV>
</BODY>







JavaScript Enlarge Image (http://www.javascriptbank.com/enlarge-image-2.html/en/) - JavaScript Fading Slide Show (http://www.javascriptbank.com/fading-slide-show.html) - JavaScript Rotating Image script (http://www.javascriptbank.com/rotating-image-script.html)

JavaScriptBank
May 16th, 2010, 21:31
This JavaScript code is the new &amp; unique solution to create a countdown timer on your web pages; it's really new in the look of web developers and users. This JavaScript countdown timer is very ea... detail (http://www.javascriptbank.com/javascript-countdown-timer-solution-in-oop.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/time/javascript-countdown-timer-solution-in-oop.jpg (http://www.javascriptbank.com/javascript/time/counter/javascript-countdown-timer-solution-in-oop/preview/en/)
Demo: JavaScript JavaScript Countdown Timer solution in OOP (http://www.javascriptbank.com/javascript-countdown-timer-solution-in-oop.html/en/)


How to setup

Step 1: CSS below for styling thescript, place it into HEAD section
CSS

<style type="text/css">
body{
font-family:arial,sans-serif;
color:#000;
background:#fff;
text-align:center;
}
input{
font-size:20px;
padding:5px;
border:none;
background:#69c;
margin:0 10px;
}
input#c[disabled]{
background:#eee;
}
#display{
font-weight:bold;
margin:20px auto;
width:720px;
font-size:350px;
}
.final{
color:#c00;
}
.over{
color:#c00;
text-decoration:blink;
}
#preferences{
margin-top:.5em;
background:#ccc;
border-top:1px solid #999;
padding:2em;
font-size:1em;
text-align:left;
}
#preferences p {
width:49%;
float:left;
padding:5px 0;
margin:0;
position: absolute;
top: 0px;
}
#preferences input{
font-size:20px;
padding:5px;
border:1px solid #999;
background:#fff;
margin:0 2px;
}
#preferences label{
padding-top:10px;
width:30%;
float:left;
display:block;
padding-right:1em;
}
#preferences input#set{
font-size:20px;
padding:5px;
width:600px;
margin:0 auto;
border:none;
background:#69c;
clear:both;
display:block;
}
#preferences input#set:hover{
background:#ffc;
}
</style>

Step 2: Use JavaScript code below to setup the script
JavaScript

<script>
countdown = function(){
/*
configuration of script, properties with
values and labels will become form elements!
*/
var cfg = {
displayID:'display',
preferencesID:'preferences',
finalClass:'final',
overClass:'over',
initialText:{
value:'2:00',
label:'Initial Text'
},
seconds:{
value:2*60,
label:'Time in Seconds'
},
finalCountdown:{
value:30,
label:'Warning start'
},
pauseLabel:{
value:'pause',
label:'Pause Text'
},
resumeLabel:{
value:'resume',
label:'Resume Text'
},
resetLabel:{
value:'reset',
label:'Reset Text'
},
startLabel:{
value:'start',
label:'Start Text'
}
};

/* presets */
var seconds = cfg.seconds.value;
var interval = null;
var secs = null;
var startTime = null;
var realsecs = null;

/* create display */
var display = document.createElement('div');
display.id = cfg.displayID;
document.body.appendChild(display);
display.innerHTML = cfg.initialText.value;

/* create form with buttons */
var form = document.createElement('form');
document.body.appendChild(form);
var startButton = createInput('button','startButton',cfg.startLabel.value);
startButton.onclick = startCountDown;
form.appendChild(startButton);
var pauseButton = createInput('button','pauseButton',cfg.pauseLabel.value);
pauseButton.onclick = pauseCountDown;
pauseButton.disabled = true;
form.appendChild(pauseButton);
var resetButton = createInput('button','resetButton',cfg.resetLabel.value);
resetButton.onclick = resetCountDown;
form.appendChild(resetButton);

/* create preferences panel */
var preferencesPanel = document.createElement('div');
preferencesPanel.id = cfg.preferencesID;
preferencesPanel.style.display = 'none';
var firstForm = document.getElementsByTagName('form')[0];
firstForm.appendChild(preferencesPanel);
var button = createInput('button',null,'preferences');
button.onclick = togglePreferences;
preferencesPanel.parentNode.insertBefore(button,preferencesP anel);
/* create preferences form */
var prefs = [];
for (var i in cfg){
if(cfg[i].value){
prefs.push(i);
var p = document.createElement('p');
p.appendChild(createLabel(cfg[i].label,i));
p.appendChild(createInput('text',i,cfg[i].value));
preferencesPanel.appendChild(p);
}
}
var setPreferencesButton = createInput('button','set','set');
preferencesPanel.appendChild(setPreferencesButton);
setPreferencesButton.onclick = setPreferences;

function setPreferences(){
for(var i=0,j=prefs.length;i<j;i++){
cfg[prefs[i]].value = document.getElementById(prefs[i]).value;
}
resetCountDown();
preferencesPanel.style.display = 'none';
}
function togglePreferences(){
preferencesPanel.style.display = preferencesPanel.style.display === 'none' ? 'block' : 'none';
}
function startCountDown(){
pauseButton.disabled = false;
startButton.disabled = true;
startTime = new Date();
interval = setInterval(countdown.doCountDown, 100);
}
function doCountDown(){
realsecs = Math.ceil(seconds - (new Date() - startTime) / 1000);
var mins = parseInt(realsecs / 60);
var secs = realsecs % 60;
display.innerHTML = parseInt(mins) + ':'+ (secs < 10 ? '0' : '') +(secs % 60);
display.className = (realsecs > cfg.finalCountdown.value) ? '' : cfg.finalClass;
if(realsecs===0){
display.className = cfg.overClass;
window.clearTimeout(interval);
}
}
function resetCountDown(){
window.clearTimeout(interval);
startButton.disabled = false;
pauseButton.disabled = true;
display.innerHTML = cfg.initialText.value;
interval = null;
seconds = cfg.seconds.value;
pauseButton.value = cfg.pauseLabel.value;
resetButton.value = cfg.resetLabel.value;
startButton.value = cfg.startLabel.value;
display.className = '';
}
function pauseCountDown(){
if(pauseButton.value === cfg.pauseLabel.value){
seconds = realsecs;
window.clearTimeout(interval);
pauseButton.value = cfg.resumeLabel.value;
} else {
startCountDown();
pauseButton.value = cfg.pauseLabel.value;
}
}
function createInput(type,id,value){
var input = document.createElement('input');
input.value = value;
input.type = type;
if(id){
input.id = id;
}
return input;
}
function createLabel(text,id){
var label = document.createElement('label');
label.appendChild(document.createTextNode(cfg[id].label));
label.htmlFor = id;
return label;
}
return {doCountDown:doCountDown};
}();
</script>







JavaScript Countdown Timer (http://www.javascriptbank.com/javascript-countdown-timer.html/en/) - JavaScript Currency Format (http://www.javascriptbank.com/currency-format-script.html) - JavaScript Format Phone Number (http://www.javascriptbank.com/format-phone-number.html)

JavaScriptBank
May 18th, 2010, 20:45
Use this JavaScript code (http://www.javascriptbank.com/javascript/) to make a a horizontal image scroller (http://www.javascriptbank.com/javascript/scroller/) on your web page. If do not view the source code, maybe you will think tha... detail (http://www.javascriptbank.com/streaming-horizontal-banner.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/image/streaming-horizontal-banner.jpg (http://www.javascriptbank.com/javascript/image/slideshow/streaming-horizontal-banner/preview/en/)
Demo: JavaScript Streaming Horizontal Banner (http://www.javascriptbank.com/streaming-horizontal-banner.html/en/)


How to setup

Step 1: CSS below for styling thescript, place it into HEAD section
CSS

<style type="text/css">
<!--
#slideCont {
border:solid 1px #000;
text-align:center;
}

#slideCont img {
margin: 5px;
}
-->
</style>

Step 2: Place JavaScript below in your HEAD section
JavaScript

<script type="text/javascript">
<!--
/*
-----------------------------------------------
Streaming banners - v.1
(c) 2006 www.haan.net
You may use this script but please leave the credits on top intact.
Please inform us of any improvements made.
When usefull we will add your credits.
------------------------------------------------ */
<!--

function clip() {
// width of the banner container
var contWidth = 425;
// height of the banner container
var contHeight = 90;

var id1 = document.getElementById('slideA');
var id2 = document.getElementById('slideB');

id1.style.left = parseInt(id1.style.left)-1 + 'px';

document.getElementById('slideCont').style.width = contWidth + "px";
document.getElementById('slideCont').style.clip = 'rect(auto,'+ contWidth +'px,' + contHeight +'px,auto)';
id2.style.display = '';
if(parseFloat(id1.style.left) == -(contWidth)) {
id1.style.left = '0px';
}
setTimeout(clip,25)
}

// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}

addLoadEvent(function() {
clip();
});
//-->
</script>

Step 3: Copy & Paste HTML code below in your BODY section
HTML

<div id="slideCont" style="overflow: hidden; position: relative; z-index: 1; width: 425px; height: 90px; top: 0px; clip: rect(auto, 425px, 90px, auto);">
<div id="slideA" style="overflow: hidden; position: absolute; z-index: 1; top: 0px; left: -194px; width: 850px; height: 90px;">
<div style="float: left;" id="innerSlideA">
<a href="http://www.apache.org/"><img src="/logos/logo_jsbank.jpg" border="0" height="44" width="126"></a>
<a href="http://www.haan.net/"><img src="/logos/gif_logojsb2.gif" border="0" height="60" width="120"></a>
<a href="http://www.mysql.com/"><img src="/logos/jsb_banner.gif" border="0" height="44" width="126"></a>

</div>
<div id="slideB" style="overflow: hidden; position: relative; z-index: 1; top: 0px; left: 0px; width: 425px; height: 90px;">
<a href="http://www.apache.org/"><img src="/logos/logo_jsb.jpg" border="0" height="44" width="126"></a>
<a href="http://www.haan.net/"><img src="/logos/logo_jsb__88x31.gif" border="0" height="60" width="120"></a>
<a href="http://www.mysql.com/"><img src="/logos/logo_jsb_120x60.jpg" border="0" height="44" width="126"></a>
</div>
</div>
</div>







JavaScript Line Graph script (http://www.javascriptbank.com/line-graph-script-index.html) - JavaScript Virtual Keyboard (http://www.javascriptbank.com/virtualkeyboard-index.html) - JavaScript Horizontal Slider (http://www.javascriptbank.com/horizontal-slider-javascript-v2-2.html)

JavaScriptBank
May 19th, 2010, 20:18
This is a simple expand collapse menu. The anchor tags that expand each menu are added by JavaScript (http://www.javascriptbank.com/), so the HTML code doesn't contain any event handlers or unnecessary HTML tags. The ... detail (http://www.javascriptbank.com/expanding-navigation-menu-onclick.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/menu/expanding-navigation-menu-onclick.jpg (http://www.javascriptbank.com/javascript/menu/multilevel-menu/expanding-navigation-menu-onclick/preview/en/)
Demo: JavaScript Expanding Navigation Menu onClick (http://www.javascriptbank.com/expanding-navigation-menu-onclick.html/en/)


How to setup

Step 1: CSS below for styling thescript, place it into HEAD section
CSS

<style type="text/css">
ul#menu {
width: 100px;
list-style-type: none;
border-top: solid 1px #b9a894;
margin: 0;
padding: 0;
}

ul#menu ol {
display: none;
text-align: right;
list-style-type: none;
margin: 0;
padding: 5px;
}

ul#menu li,
ul#menu a {
font-family: verdana, sans-serif;
font-size: 11px;
color: #785a3c;
}

ul#menu li {
border-bottom: solid 1px #b9a894;
line-height: 15px;
}

ul#menu ol li {
border-bottom: none;
}

ul#menu ol li:before {
content: "-";
}

ul#menu a {
text-decoration: none;
outline: none;
}

ul#menu a:hover {
color: #539dbc;
}

ul#menu a.active {
color: #be5028;
}
</style>

Step 2: Place JavaScript below in your HEAD section
JavaScript

<script language="javascript">

/*
Created by: Travis Beckham :: http://www.squidfingers.com | http://www.podlob.com
version date: 06/02/03 :: If want to use this code, feel free to do so,
but please leave this message intact. (Travis Beckham) */

// Node Functions

if(!window.Node){
var Node = {ELEMENT_NODE : 1, TEXT_NODE : 3};
}

function checkNode(node, filter){
return (filter == null || node.nodeType == Node[filter] || node.nodeName.toUpperCase() == filter.toUpperCase());
}

function getChildren(node, filter){
var result = new Array();
var children = node.childNodes;
for(var i = 0; i < children.length; i++){
if(checkNode(children[i], filter)) result[result.length] = children[i];
}
return result;
}

function getChildrenByElement(node){
return getChildren(node, "ELEMENT_NODE");
}

function getFirstChild(node, filter){
var child;
var children = node.childNodes;
for(var i = 0; i < children.length; i++){
child = children[i];
if(checkNode(child, filter)) return child;
}
return null;
}

function getFirstChildByText(node){
return getFirstChild(node, "TEXT_NODE");
}

function getNextSibling(node, filter){
for(var sibling = node.nextSibling; sibling != null; sibling = sibling.nextSibling){
if(checkNode(sibling, filter)) return sibling;
}
return null;
}
function getNextSiblingByElement(node){
return getNextSibling(node, "ELEMENT_NODE");
}

// Menu Functions & Properties

var activeMenu = null;

function showMenu() {
if(activeMenu){
activeMenu.className = "";
getNextSiblingByElement(activeMenu).style.display = "none";
}
if(this == activeMenu){
activeMenu = null;
} else {
this.className = "active";
getNextSiblingByElement(this).style.display = "block";
activeMenu = this;
}
return false;
}

function initMenu(){
var menus, menu, text, a, i;
menus = getChildrenByElement(document.getElementById("menu"));
for(i = 0; i < menus.length; i++){
menu = menus[i];
text = getFirstChildByText(menu);
a = document.createElement("a");
menu.replaceChild(a, text);
a.appendChild(text);
a.href = "#";
a.onclick = showMenu;
a.onfocus = function(){this.blur()};
}
}

if(document.createElement) window.onload = initMenu;

</script>

Step 3: Place HTML below in your BODY section
HTML

<ul id="menu">
<li>Menu Item 1
<ol>
<li><a href="#">Sub Item 1.1</a></li>
<li><a href="#">Sub Item 1.2</a></li>
<li><a href="#">Sub Item 1.3</a></li>

</ol>
</li>
<li>Menu Item 2
<ol>
<li><a href="#">Sub Item 2.1</a></li>
<li><a href="#">Sub Item 2.2</a></li>
<li><a href="#">Sub Item 2.3</a></li>
</ol>

</li>
<li>Menu Item 3
<ol>
<li><a href="#">Sub Item 3.1</a></li>
<li><a href="#">Sub Item 3.2</a></li>
<li><a href="#">Sub Item 3.3</a></li>
</ol>
</li>

<li>Menu Item 4
<ol>
<li><a href="#">Sub Item 4.1</a></li>
<li><a href="#">Sub Item 4.2</a></li>
<li><a href="#">Sub Item 4.3</a></li>
</ol>
</li>
<li>Menu Item 5
<ol>

<li><a href="#">Sub Item 5.1</a></li>
<li><a href="#">Sub Item 5.2</a></li>
<li><a href="#">Sub Item 5.3</a></li>
</ol>
</li>
</ul>







JavaScript Line Graph script (http://www.javascriptbank.com/line-graph-script-index.html) - JavaScript Virtual Keyboard (http://www.javascriptbank.com/virtualkeyboard-index.html) - JavaScript Horizontal Slider (http://www.javascriptbank.com/horizontal-slider-javascript-v2-2.html)

JavaScriptBank
May 21st, 2010, 20:48
This JavaScript codecan be used to be that a mouse cursor pointer was just a mouse cursor. Since DHTML came along and gave programmers the ability to track the precise coordinates of the mouse, it was... detail (http://www.javascriptbank.com/waving-text-trailer.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/mouse/waving-text-trailer.jpg (http://www.javascriptbank.com/javascript/mouse/trailer/waving-text-trailer/preview/en/)
Demo: JavaScript Waving Text Trailer (http://www.javascriptbank.com/waving-text-trailer.html/en/)


How to setup

Step 1: CSS below for styling thescript, place it into HEAD section
CSS

<STYLE>.spanstyle {
FONT-WEIGHT: bold; FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana; POSITION: absolute; TOP: -50px
}
</STYLE>

Step 2: Copy & Paste JavaScript code below in your HEAD section
JavaScript

<SCRIPT>

/*
Cursor Trailor Text- By Peter Gehrig (http://www.24fun.ch/)
Permission given to Dynamicdrive.com to feature script in it's archive.
*/

var moves=17
var tracker=0
var xpos
var ypos
var cursortext='JavaScriptBank.com - Bank of over 2000+ free JavaScript'
cursortext=cursortext.split("")

function setup() {
if (tracker==1 && document.all) {
for (i=cursortext.length-1; i>=1; i--) {
xposition[i]=xposition[i-1]+moves
yposition[i]=yposition[i-1]
}
xposition[0]=xpos+moves
yposition[0]=ypos

for (i=0; i<cursortext.length-1; i++) {
var thisspan = eval("span"+(i)+".style")
thisspan.posLeft=xposition[i]
thisspan.posTop=yposition[i]
}
}

else if (tracker==1 && document.layers) {
for (i=cursortext.length-1; i>=1; i--) {
xposition[i]=xposition[i-1]+moves
yposition[i]=yposition[i-1]
}
xposition[0]=xpos+moves
yposition[0]=ypos

for (i=0; i<cursortext.length-1; i++) {
var thisspan = eval("document.span"+i)
thisspan.left=xposition[i]
thisspan.top=yposition[i]
}
}
var timer=setTimeout("setup()",40)
}

function MouseMovement(e)
{
xpos = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
ypos = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
tracker=1
}

var xposition=new Array()
for (i=0;i<=cursortext.length-1;i++) {
xposition[i]=-50
}

var yposition=new Array()
for (i=0;i<=cursortext.length-1;i++) {
yposition[i]=-50
}

/*hieu ung di chuyen chuot*/

for (i=0;i<=cursortext.length-1;i++) {
document.write("<span id='span"+i+"' class='spanstyle'>")
document.write(cursortext[i])
document.write("</span>")
}

if (document.layers){
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = MouseMovement;
</SCRIPT>

Step 3: Copy & Paste HTML code below in your BODY section
HTML

<BODY onload=setup()>
</body>







Javascript Music Player (http://www.javascriptbank.com/web-based-music-player.html/en/) - Random Text Generator (http://www.javascriptbank.com/random-text-generator.html) - Floating Image Script (http://www.javascriptbank.com/up-down-floating-image.html)

JavaScriptBank
May 23rd, 2010, 20:39
Spreading the love on your site with this JavaScript! It produces big kisses and lips behind your mouse pointer as it moves, each disappearing only after a noticeable delay (set to 1 second in demo). ... detail (http://www.javascriptbank.com/trailing-kisses-and-lips.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/mouse/trailing-kisses-and-lips.jpg (http://www.javascriptbank.com/javascript/mouse/trailer/trailing-kisses-and-lips/preview/en/)
Demo: JavaScript Trailing Kisses and Lips (http://www.javascriptbank.com/trailing-kisses-and-lips.html/en/)


How to setup

Step 1: Place CSS below in your HEAD section
CSS

<style type="text/css">
<!--
h1 {
color:#cc3333;
font-family:"Comic Sans MS",Helvetica;
}
h3 {
color:#993333;
font-family:"Comic Sans MS",Helvetica;
}
.kisser {
position:absolute;
top:0;
left:0;
visibility:hidden;
}
-->
</style>

Step 2: Use JavaScript code below to setup the script
JavaScript

<script language="JavaScript1.2" type="text/JavaScript">
<!-- cloak
//Kissing trail- By dij8 (dij8@dij8.com)
//Modified by Dynamic Drive for bug fixes
//Visit http://www.dynamicdrive.com for this script

kisserCount = 15 //maximum number of images on screen at one time
curKisser = 0 //the last image DIV to be displayed (used for timer)
kissDelay = 1000 //duration images stay on screen (in milliseconds)
kissSpacer = 50 //distance to move mouse b4 next heart appears
theimage = "lips_small.gif" //the 1st image to be displayed
theimage2 = "small_heart.gif" //the 2nd image to be displayed


//Browser checking and syntax variables
var docLayers = (document.layers) ? true:false;
var docId = (document.getElementById) ? true:false;
var docAll = (document.all) ? true:false;
var docbitK = (docLayers) ? "document.layers['":(docId) ? "document.getElementById('":(docAll) ? "document.all['":"document."
var docbitendK = (docLayers) ? "']":(docId) ? "')":(docAll) ? "']":""
var stylebitK = (docLayers) ? "":".style"
var showbitK = (docLayers) ? "show":"visible"
var hidebitK = (docLayers) ? "hide":"hidden"
var ns6=document.getElementById&&!document.all
//Variables used in script
var posX, posY, lastX, lastY, kisserCount, curKisser, kissDelay, kissSpacer, theimage
lastX = 0
lastY = 0
//Collection of functions to get mouse position and place the images
function doKisser(e) {

posX = getMouseXPos(e)
posY = getMouseYPos(e)
if (posX>(lastX+kissSpacer)||posX<(lastX-kissSpacer)||posY>(lastY+kissSpacer)||posY<(lastY-kissSpacer)) {
showKisser(posX,posY)
lastX = posX
lastY = posY
}
}
// Get the horizontal position of the mouse
function getMouseXPos(e) {
if (document.layers||ns6) {
return parseInt(e.pageX+10)
} else {
return (parseInt(event.clientX+10) + parseInt(document.body.scrollLeft))
}
}
// Get the vartical position of the mouse
function getMouseYPos(e) {
if (document.layers||ns6) {
return parseInt(e.pageY)
} else {
return (parseInt(event.clientY) + parseInt(document.body.scrollTop))
}
}
//Place the image and start timer so that it disappears after a period of time
function showKisser(x,y) {
var processedx=ns6? Math.min(x,window.innerWidth-75) : docAll? Math.min(x,document.body.clientWidth-55) : x
if (curKisser >= kisserCount) {curKisser = 0}
eval(docbitK + "kisser" + curKisser + docbitendK + stylebitK + ".left = " + processedx)
eval(docbitK + "kisser" + curKisser + docbitendK + stylebitK + ".top = " + y)
eval(docbitK + "kisser" + curKisser + docbitendK + stylebitK + ".visibility = '" + showbitK + "'")
if (eval("typeof(kissDelay" + curKisser + ")")=="number") {
eval("clearTimeout(kissDelay" + curKisser + ")")
}
eval("kissDelay" + curKisser + " = setTimeout('hideKisser(" + curKisser + ")',kissDelay)")
curKisser += 1
}
//Make the image disappear
function hideKisser(knum) {
eval(docbitK + "kisser" + knum + docbitendK + stylebitK + ".visibility = '" + hidebitK + "'")
}

function kissbegin(){
//Let the browser know when the mouse moves
if (docLayers) {
document.captureEvents(Event.MOUSEMOVE)
document.onMouseMove = doKisser
} else {
document.onmousemove = doKisser
}
}
window.onload=kissbegin
// decloak -->
</script>

Step 3: Copy & Paste HTML code below in your BODY section
HTML

<script language="JavaScript" type="text/JavaScript">
<!-- cloak
// Add all DIV's of hearts
if (document.all||document.getElementById||document.layers){
for (k=0;k<kisserCount;k=k+2) {
document.write('<div id="kisser' + k + '" class="kisser"><img src="' + theimage + '" alt="" border="0"></div>n')
document.write('<div id="kisser' + (k+1) + '" class="kisser"><img src="' + theimage2 + '" alt="" border="0"></div>n')
}
}

// decloak -->
</script>

Step 4: must download files below
Files
lips_small.gif (http://www.javascriptbank.com/javascript/mouse/Trailing_Kisses_and_Lips/lips_small.gif)
small_heart.gif (http://www.javascriptbank.com/javascript/mouse/Trailing_Kisses_and_Lips/small_heart.gif)







Javascript Music Player (http://www.javascriptbank.com/web-based-music-player.html/en/) - Random Text Generator (http://www.javascriptbank.com/random-text-generator.html) - Floating Image Script (http://www.javascriptbank.com/up-down-floating-image.html)

JavaScriptBank
May 25th, 2010, 20:54
Slideshow with great transitoon effect. Each image (http://www.javascriptbank.com/javascript/image/) has a JavaScript link (http://www.javascriptbank.com/javascript/link/) of its own. Netscape-users will see a simple image-rotation-ef... detail (http://www.javascriptbank.com/slideshow-with-zoom-in-zoom-out-animation.html/en//) at JavaScriptBank.com - 2.000+ free JavaScript codes (http://www.javascriptbank.com/)


http://www.javascriptbank.com/javascript.images/image/slideshow-with-zoom-in-zoom-out-animation.jpg (http://www.javascriptbank.com/javascript/image/slideshow/slideshow-with-zoom-in-zoom-out-animation/preview/en/)
Demo: JavaScript Slideshow with zoom-in-zoom-out-animation (http://www.javascriptbank.com/slideshow-with-zoom-in-zoom-out-animation.html/en/)


How to setup

Step 1: Copy & Paste HTML code below in your BODY section
HTML

<BODY onload=initiate()>
<SCRIPT>
<!-- Beginning of JavaScript -
// Slideshow with zoom-in-zoom-out-animation

// CONFIGURATION:
// 1. Create your images (gif or jpg). They should have the same width.
// Put those images in the same directory as the HTML-file.
// You can add as many images as you like.
// 2. Copy the script-block and paste it into head-section of your HTML-file..
// 3. Copy the span-blocks with the id "imgcontainer" into the body-section
// of your HTML-file.
// 4. Insert 'onLoad="initiate()"' into the body tag.
// 5. Configure the varibales below.

// The width of your images (pixels). All pictures should have the same width.
var imgwidth=256

// The horizontal and vertical position of the images (pixels).
var pos_left=10
var pos_top=10

// The name of your images. You may add as many images as you like.
var imgname=new Array()
imgname[0]="logojs.gif"
imgname[1]="photo3.jpg"
imgname[2]="photo4.jpg"

// Where should those images be linked to?
// Add an URL for each image.
// If you don't want to add an URL just write '#' instead of the URL.
var imgurl=new Array()
imgurl[0]="http://javascriptbank.com"
imgurl[1]="http://javascriptbank.com"
imgurl[2]="http://javascriptbank.com"

// This block will preload your images. Do not edit this block.
var imgpreload=new Array()
for (i=0;i<=imgname.length-1;i++) {
imgpreload[i]=new Image()
imgpreload[i].src=imgname[i]
}

// Standstill-time between the images (microseconds).
var pause=2000

// Speed of the stretching and shrinking effect. More means slower.
var speed=20

// This variable also affects the speed (the length of the step between each inmage-frame measured in pixels). More means faster.
var step=10

// Do not edit the variables below
var i_loop=0
var i_image=0

function stretchimage() {
if (i_loop<=imgwidth) {
if (document.all) {
imgcontainer.innerHTML="<a href='"+imgurl[i_image]+"' target='_blank'><img width='"+i_loop+"' src='"+imgname[i_image]+"' border='0'></a>"

}
i_loop=i_loop+step
var timer=setTimeout("stretchimage()",speed)
}
else {
clearTimeout(timer)
var timer=setTimeout("shrinkimage()",pause)
}
}

function shrinkimage() {
if (i_loop>-step) {
if (document.all) {
imgcontainer.innerHTML="<a href='"+imgurl[i_image]+"' target='_blank'><img width='"+i_loop+"' src='"+imgname[i_image]+"' border='0'></a>"

}
i_loop=i_loop-step
var timer=setTimeout("shrinkimage()",speed)
}
else {
clearTimeout(timer)
changeimage()
}
}

function changeimage() {
i_loop=0
i_image++
if (i_image>imgname.length-1) {i_image=0}
var timer=setTimeout("stretchimage()",pause)
}

function initiate() {
if (document.all) {
document.all.imgcontainer.style.posLeft=pos_left
document.all.imgcontainer.style.posTop=pos_top
changeimage()
}
if (document.layers) {
document.imgcontainer.left=pos_left
document.imgcontainer.top=pos_top
rotatenetscape()
}
}

function rotatenetscape() {
document.imgcontainer.document.write("<a href='"+imgurl[i_image]+"' target='_blank'><img src='"+imgname[i_image]+"' border='0'></a>")
document.imgcontainer.document.close()
i_image++
if (i_image>imgname.length-1) {i_image=0}
var timer=setTimeout("rotatenetscape()",pause*2)
}

document.write("<div id=\"roof\" style=\"position:relative\">")

document.write("<div id=\"imgcontainer\" style=\"position:absolute;top:0px;left:0px\"></div>")
document.write("</div>")

// - End of JavaScript - -->

</SCRIPT>
</BODY>
<!--
This script downloaded from www.JavaScriptBank.com
Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
-->








JavaScript Line Graph script (http://www.javascriptbank.com/line-graph-script-index.html) - JavaScript Virtual Keyboard (http://www.javascriptbank.com/virtualkeyboard-index.html) - JavaScript Horizontal Slider (http://www.javascriptbank.com/horizontal-slider-javascript-v2-2.html)

lita
June 19th, 2010, 02:27
HI,
Thank you very much for providing free java script code. I would like to implement it.