|
Scripts and Tools Share your free scripts , tools , icons, fontz, screen savers , etc here. |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
JavaScript codes for Web DEV
Free JavaSccript codes JavaScript Countdown Timer This JavaScript displays a countdown timer and alerts the user when the timer reaches zero. It then redirects to another Web ... detail [IMG]hxxp ://w w w.javascriptbank. com/javascript.images/time/countdown-timer.jpg[/IMG] Demo: JavaScript Countdown Timer How to setup Step 1: Use CSS code below for styling the script CSS Code:
<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 w w w.JavaScriptBank. com Come to view and download over 2000+ free javascript at w w w.JavaScriptBank. com --> JavaScript Code:
<script language="javascript"> // Created by: Neill Broderick :: hxxp ://w w w.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 w w w.JavaScriptBank. com Come to view and download over 2000+ free javascript at w w w.JavaScriptBank. com --> HTML Code:
<form name="cd"> <input id="txt" readonly="true" type="text" value="10:00" border="0" name="disp"> </form> <!-- This script downloaded from w w w.JavaScriptBank. com Come to view and download over 2000+ free javascript at w w w.JavaScriptBank. com --> Command to print web page in javascript - Javascript Time Picker - JavaScript Go To URL Box
Quote:
|
#2
|
|||
|
|||
Image slideshow transition
This JavaScript creates slideshow effect with one of transitions.... detail
[IMG]hxxp ://w w w.javascriptbank. com/javascript.images/image/image-slideshow-transition.jpg[/IMG] Demo: Image slideshow transition How to setup Step 1: Copy & Paste JavaScript code below in your HEAD section JavaScript Code:
<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 w w w.JavaScriptBank. com Come to view and download over 2000+ free javascript at w w w.JavaScriptBank. com --> HTML Code:
<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 w w w.JavaScriptBank. com Come to view and download over 2000+ free javascript at w w w.JavaScriptBank. com --> JavaScript Spotlight - JavaScript Validate E-Mail - AJAX Page Content Loader
|
#3
|
|||
|
|||
Web based Music Player
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
[IMG]hxxp ://w w w.javascriptbank. com/javascript.images/multimedia/web-based-music-player.jpg[/IMG] Demo: Web based Music Player How to setup Step 1: Copy & Paste JavaScript code below in your HEAD section JavaScript Code:
<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> HTML Code:
<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 Countdown Timer - JavaScript Currency Format - JavaScript Format Phone Number
|
#4
|
|||
|
|||
Make link open in new tab/window
Use this simple JavaScript to make all links on your web pages open in new tab/window. Script is easy to setup, you should save them into a f... detail
[IMG]hxxp ://w w w.javascriptbank. com/javascript.images/link/make-link-open-in-new-tab-window.jpg[/IMG] Demo: Make link open in new tab/window How to setup Step 1: Use JavaScript code below to setup the script JavaScript Code:
<script language=javascript> /* Kevin Yank hxxp ://w w w.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 w w w.JavaScriptBank. com Come to view and download over 2000+ free javascript at w w w.JavaScriptBank. com --> HTML Code:
<a href="hxxp ://javascriptbank. com/">Home</a> | <a href="hxxp ://javascriptbank. com/4rum/">Forum</a> | <a href="hxxp ://javascriptbank. com/javascript/">JavaScript</a> | <a href="hxxp ://javascriptbank. com/service/">Services</a> | <a href="hxxp ://javascriptbank. com/javascript/submit-javascript-bank.html">Submit script</a> | <a href="hxxp ://javascriptbank. com/thietkeweb/javascriptmall/">Documentary</a> | <a href="hxxp ://javascriptbank. com/javascript/contact-javascript-bank.html">Contact us</a> | <a href="hxxp ://javascriptbank. com/javascript/aboutus-javascript-bank.html">About us</a> <!-- This script downloaded from w w w.JavaScriptBank. com Come to view and download over 2000+ free javascript at w w w.JavaScriptBank. com --> JavaScript Vertical Marquee - JavaScript DHTML analog clock - JavaScript Backwards Text
|
#5
|
|||
|
|||
AJAX Page Content Loader
AJAX - a very great web development technology nowaday. Use this AJAX in order to load XML and HTML files on the same website with XMLHttpRequest. And in the body... detail at JavaScriptBank. com - 2.000+ free JavaScript codes
[IMG]hxxp ://w w w.javascriptbank. com/javascript.images/ajax/ajax-page-content-loader.jpg[/IMG] Demo: AJAX Page Content Loader How to setup Step 1: Place CSS below in your HEAD section CSS Code:
<style type="text/css"> <!-- #contentLYR { position:relative;/* width:200px; height:115px; left: 200px; top: 200px;*/ z-index:1; } --> </style> JavaScript Code:
<script type="text/javascript"> <!-- Begin /* This script downloaded from w w w.JavaScriptBank. com Come to view and download over 2000+ free javascript at w w w.JavaScriptBank. com */ // Created by: Eddie Traversa (2005) :: hxxp ://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> HTML Code:
<div id="contentLYR"></div> <script>window.onload = function(){ajaxLoader('demo.xml','contentLYR');}</script> Files demo.xml JavaScript Spotlight - JavaScript Validate E-Mail - AJAX Page Content Loader
|
#6
|
|||
|
|||
Top 10 JavaScript Frameworks by Google, Yahoo, Bing
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 at JavaScriptBank. com - 2.000+ free JavaScript codes
[IMG]hxxp ://w w w.javascriptbank. com/javascript.images/article/top-10-javascript-frameworks-by-google--yahoo--bing.jpg[/IMG] Demo: Top 10 JavaScript Frameworks by Google, Yahoo, Bing How to setup AJAX news ticker - JavaScript Refresh Page - JavaScript Unclosable Window
|
#7
|
|||
|
|||
Time Picker with child window
This JavaScript code - date picker helps you choose a time through a popup window. Perhaps this feature is not new on J... detail at JavaScriptBank. com - 2.000+ free JavaScript codes
[IMG]hxxp ://w w w.javascriptbank. com/javascript.images/time/time-picker-with-child-window.jpg[/IMG] 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> HTML Code:
<form name="form1"> <input id="field" onkeydown="time(this.id)"/> </form> Files down.jpg time.html timePicker.js up.jpg Command to print web page in javascript - Javascript Time Picker - JavaScript Go To URL Box
|
#8
|
|||
|
|||
Fading Slide Show
Displays images continuously in a slideshow presentation format, with a fade effect on image transitions. (Fade in Internet Explorer 4+ only).... detail at JavaScriptBank. com - 2.000+ free JavaScript codes
[IMG]hxxp ://w w w.javascriptbank. com/javascript.images/image/fading-slide-show.jpg[/IMG] Demo: Fading Slide Show How to setup Step 1: Place JavaScript below in your HEAD section JavaScript Code:
<script> /* Original: CodeLifter. com (support@codelifter. com) Web Site: hxxp ://w w w.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 w w w.JavaScriptBank. com Come to view and download over 2000+ free javascript at w w w.JavaScriptBank. com --> HTML Code:
<body onLoad="runSlideShow()"> <img id="VU" src="logojs.gif" name='SlideShow'> </body> <!-- This script downloaded from w w w.JavaScriptBank. com Come to view and download over 2000+ free javascript at w w w.JavaScriptBank. com --> JavaScript Vertical Marquee - JavaScript DHTML analog clock - JavaScript Backwards Text
|
#9
|
|||
|
|||
Virtual Keyboard
This 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 at JavaScriptBank. com - 2.000+ free JavaScript codes
[IMG]hxxp ://w w w.javascriptbank. com/javascript.images/utility/virtualkeyboard-index.jpg[/IMG] Demo: Virtual Keyboard How to setup Step 1: Copy & Paste JavaScript code below in your HEAD section JavaScript Code:
<script type="text/javascript" src="vk_loader.js" ></script> <!-- This script downloaded from w w w.JavaScriptBank. com Come to view and download over 2000+ free javascript at w w w.JavaScriptBank. com --> HTML Code:
<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 w w w.JavaScriptBank. com Come to view and download over 2000+ free javascript at w w w.JavaScriptBank. com --> Files Virtual_Keyboard.zip JavaScript Enlarge Image - JavaScript Fading Slide Show - JavaScript Rotating Image script
|
#10
|
|||
|
|||
Refresh Page - Automatic
Keep your content fresh. Use this JavaScript to automatically reload a fresh copy of your Web page from the server. You determine the time de... detail at JavaScriptBank. com - 2.000+ free JavaScript codes
[IMG]hxxp ://w w w.javascriptbank. com/javascript.images/browser/refresh-page-automatic.jpg[/IMG] Demo: Refresh Page - Automatic How to setup Step 1: Place JavaScript below in your HEAD section JavaScript Code:
<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 w w w.JavaScriptBank. com Come to view and download over 2000+ free javascript at w w w.JavaScriptBank. com --> Javascript floating message - Javascript multi level drop down menu - JavaScript in_array()
|
Bookmarks |
|
|