Page 11 of 17 FirstFirst ... 910111213 ... LastLast
Results 101 to 110 of 161

Thread: Free JavaScript codes

  1. #101
    JavaScriptBank is offline Unknown Net Builder
    Join Date
    Sep 2009
    Posts
    151
    Thanks
    0
    Thanked 5 Times in 5 Posts

    The Ultimate JavaScript Tutorial in Web Design

    In this free ultimate JavaScript tutorial, you'll find the full resources in web development, web design and web programming/coding. From the list of useful resources in this JavaScript tutorial, you ... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup







  2. #102
    JavaScriptBank is offline Unknown Net Builder
    Join Date
    Sep 2009
    Posts
    151
    Thanks
    0
    Thanked 5 Times in 5 Posts

    jsClock: Featured Digital Clock JavaScript

    If you're needing a simple digital clock that is updating automatically and takes directly the time from the server, also you want to show the time in other count... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup

    Step 1: Place CSS below in your HEAD section
    CSS
    Code:
    <style type="text/css">
    /*
         This script downloaded from www.JavaScriptBank.com
         Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
    */
    .clock{
    	cursor:pointer;
    	padding:5px 5px 5px 5px;
    	margin:5px 0 5px 0;
    	width:70px;
    	-webkit-border-bottom-right-radius: 4px;
    	-webkit-border-bottom-left-radius: 4px;
    	-webkit-border-top-right-radius: 4px;
    	-webkit-border-top-left-radius: 4px;
    	-moz-border-radius-bottomright: 4px;
    	-moz-border-radius-bottomleft: 4px;
    	-moz-border-radius-topright: 4px;
    	-moz-border-radius-topleft: 4px;
    	text-align:center;
    	font-weight: bold;
    	font-family: arial;
    }
    
    
    #clock { 
    	background-color:#000000;
    	color:#00CC66; 
    }
    
    #reloj { 
    	background-color:#999999;
    	color:#FFFFFF; 
    }
    
    
    #rellotje { 
    	background-color:#237ab2;
    	color:#FFFFFF; 
    }
    </style>
    Step 2: Copy & Paste JavaScript code below in your HEAD section
    JavaScript
    Code:
    <script type="text/javascript">
    /*
         This script downloaded from www.JavaScriptBank.com
         Come to view and download over 2000+ free javascript at www.JavaScriptBank.com
    */
    function moveClock(idClock,startTime){//move given clock
    	var timeout=1000;//miliseconds to repeat the function
    
    	if ( startTime === undefined ) {//just take the browser time
    	    	rightNow = new Date();
    		hour = rightNow.getHours();
    		minute = rightNow.getMinutes();
    		second = rightNow.getSeconds();		
    	}	
    	else{//starttime set
    		rightNow = startTime.split(':',3);
    		hour = parseInt(rightNow[0],10);
    		minute =  parseInt(rightNow[1],10);
    		second =  parseInt(rightNow[2],10);
    		if (second==59){
    			if (minute==59){
    				if (hour==23) hour=0;	
    				else hour++;
    				minute=0;
    			}else minute++;
    			second=0;
    		}else second++;
    	}
    
    	if (minute<10) minute= "0" + minute;
    	if (second<10) second= "0" + second;
    
    	currentTime=hour + ":" + minute + ":" +second;// tim to return
    	document.getElementById(idClock).innerHTML = currentTime;//tim for the HTML element
    
    	//recursivity
    	if (startTime===undefined) setTimeout("moveClock('"+idClock+"')",timeout);//browser time
    	else setTimeout("moveClock('"+idClock+"','"+currentTime+"')",timeout);//set time
    		
    }
    </script>
    Step 3: Copy & Paste HTML code below in your BODY section
    HTML
    Code:
    Normal clock using browser time: 
    
    <div id="clock" class="clock">clock</div>moveClock("clock");<br /><br />
    <hr>
    Clock using server time:
    <div id="reloj" class="clock">reloj</div>  moveClock("reloj","< ?php echo date("G:i:s");? >");<br /><br />
    <hr>
    Clock with manual time: 
    <div id="rellotje" class="clock">rellotje</div> moveClock("rellotje","23:58:56");<br /><br />
    <hr>
    
    <script  type='text/javascript'>
    moveClock("clock");
    moveClock("reloj","2:23:25");
    moveClock("rellotje","23:58:56");
    </script>






  3. #103
    JavaScriptBank is offline Unknown Net Builder
    Join Date
    Sep 2009
    Posts
    151
    Thanks
    0
    Thanked 5 Times in 5 Posts

    jsPDF: Generating your PDF Web Page Documents using JavaScript

    <b>jsPDF</b> is an open-source JavaScript library written by <i>James</i>, this tool allow us generate PDF web page documents in server-side and client-side by using nothing... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup

    Step 1: Use JavaScript code below to setup the script
    JavaScript
    Code:
    <script type="text/javascript" src="base64.js"></script>
    <script type="text/javascript" src="sprintf.js"></script>
    <script type="text/javascript" src="jspdf.js"></script>
    
    <script type="text/javascript">
    
    function demo1() {
    	var doc = new jsPDF();
    	doc.text(20, 20, 'Hello world!');
    	doc.text(20, 30, 'This is client-side Javascript, pumping out a PDF.');
    	doc.addPage();
    	doc.text(20, 20, 'Do you like that?');
    	
    	// Output as Data URI
    	doc.output('datauri');
    }
    
    function demo2() {
    	var doc = new jsPDF();
    	doc.setFontSize(22);
    	doc.text(20, 20, 'This is a title');
    	
    	doc.setFontSize(16);
    	doc.text(20, 30, 'This is some normal sized text underneath.');	
    	
    	// Output as Data URI
    	doc.output('datauri');
    }
    
    function demo3() {
    	var doc = new jsPDF();
    	doc.text(20, 20, 'This PDF has a title, subject, author, keywords and a creator.');
    	
    	// Optional - set properties on the document
    	doc.setProperties({
    		title: 'Title',
    		subject: 'This is the subject',		
    		author: 'James Hall',
    		keywords: 'generated, javascript, web 2.0, ajax',
    		creator: 'MEEE'
    	});
    	
    	// Output as Data URI
    	doc.output('datauri');
    }
    
    function demo4() {	
    	var name = prompt('What is your name?');
    	var multiplier = prompt('Enter a number:');
    	multiplier = parseInt(multiplier);
    
    	var doc = new jsPDF();
    	doc.setFontSize(22);	
    	doc.text(20, 20, 'Questions');
    	doc.setFontSize(16);
    	doc.text(20, 30, 'This belongs to: ' + name);
    	
    	for(var i = 1; i <= 12; i ++) {
    		doc.text(20, 30 + (i * 10), i + ' x ' + multiplier + ' = ___');
    	}
    	
    	doc.addPage();
    	doc.setFontSize(22);
    	doc.text(20, 20, 'Answers');
    	doc.setFontSize(16);
    	
    	for(var i = 1; i <= 12; i ++) {
    		doc.text(20, 30 + (i * 10), i + ' x ' + multiplier + ' = ' + (i * multiplier));
    	}	
    	doc.output('datauri');
    	
    }
    
    </script>
    Step 2: Copy & Paste HTML code below in your BODY section
    HTML
    Code:
    <h2>Simple Two-page Text Document</h2>
    <pre>var doc = new jsPDF();
    doc.text(20, 20, 'Hello world!');
    doc.text(20, 30, 'This is client-side Javascript, pumping out a PDF.');
    doc.addPage();
    doc.text(20, 20, 'Do you like that?');
    
    // Output as Data URI
    doc.output('datauri');</pre>
    <a href="javascript:demo1()">Run Code</a>
    
    <h2>Different font sizes</h2>
    <pre>var doc = new jsPDF();
    doc.setFontSize(22);
    doc.text(20, 20, 'This is a title');
    
    doc.setFontSize(16);
    doc.text(20, 30, 'This is some normal sized text underneath.');	
    
    // Output as Data URI
    doc.output('datauri');</pre>
    <a href="javascript:demo2()">Run Code</a>
    
    
    <h2>Adding metadata</h2>
    <pre>var doc = new jsPDF();
    doc.text(20, 20, 'This PDF has a title, subject, author, keywords and a creator.');
    
    // Optional - set properties on the document
    doc.setProperties({
    	title: 'Title',
    	subject: 'This is the subject',		
    	author: 'James Hall',
    	keywords: 'generated, javascript, web 2.0, ajax',
    	creator: 'MEEE'
    });
    
    // Output as Data URI
    doc.output('datauri');</pre>
    <a href="javascript:demo3()">Run Code</a>
    
    
    <h2>Example of user input</h2>
    <pre>var name = prompt('What is your name?');
    var multiplier = prompt('Enter a number:');
    multiplier = parseInt(multiplier);
    
    var doc = new jsPDF();
    doc.setFontSize(22);	
    doc.text(20, 20, 'Questions');
    doc.setFontSize(16);
    doc.text(20, 30, 'This belongs to: ' + name);
    
    for(var i = 1; i <= 12; i ++) {
    	doc.text(20, 30 + (i * 10), i + ' x ' + multiplier + ' = ___');
    }
    
    doc.addPage();
    doc.setFontSize(22);
    doc.text(20, 20, 'Answers');
    doc.setFontSize(16);
    
    for(var i = 1; i <= 12; i ++) {
    	doc.text(20, 30 + (i * 10), i + ' x ' + multiplier + ' = ' + (i * multiplier));
    }	
    doc.output('datauri');</pre>
    <a href="javascript:demo4()">Run Code</a>
    Step 3: downloads
    Files
    base64.js
    jspdf.js
    sprintf.js







  4. #104
    JavaScriptBank is offline Unknown Net Builder
    Join Date
    Sep 2009
    Posts
    151
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Remove an Element in JavaScript Array

    This free JavaScript snippet guides you how to remove an element in JavaScript array, by the value of element or its index. Very useful and helpful for coding and programming in JavaScript. Indexes in... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup







  5. #105
    JavaScriptBank is offline Unknown Net Builder
    Join Date
    Sep 2009
    Posts
    151
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Simply Button v2: Super Cool-Sexy Button for Your Website


  6. #106
    JavaScriptBank is offline Unknown Net Builder
    Join Date
    Sep 2009
    Posts
    151
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Top 50 Most Addictive and Popuplar Facebook mini games

    At this time of post, I'm sure that almost people in this world know what's Facebook. And I believe that every one of us ever once enters Facebook to see its content, to know why it becomes popuplar l... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup







  7. #107
    JavaScriptBank is offline Unknown Net Builder
    Join Date
    Sep 2009
    Posts
    151
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Top 10 Excellent & Free Online Poll Makers

    With a little of programming skills, we can easy make an online poll creator quickly. However, it takes a lot of time if we like to make our own polls become more a... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup







  8. #108
    JavaScriptBank is offline Unknown Net Builder
    Join Date
    Sep 2009
    Posts
    151
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Mega Collection of Cheat Sheets with HTML, CSS, PHP, Javascript

    Cheat sheets are really helpful in revising your application codes as there are so many functions, constants, classes ... which we cannot remember always but good cheat sheets are of great help in kee... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup







  9. #109
    JavaScriptBank is offline Unknown Net Builder
    Join Date
    Sep 2009
    Posts
    151
    Thanks
    0
    Thanked 5 Times in 5 Posts

  10. #110
    JavaScriptBank is offline Unknown Net Builder
    Join Date
    Sep 2009
    Posts
    151
    Thanks
    0
    Thanked 5 Times in 5 Posts

    10 Great JavaScript Plugins and Resources for CSS TreeView and Sitemap

    HTML JavaScript TreeView and JavaScript Sitemap are good tools to display the structure of your website, are better solutions to organize your huge indexes.... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup







Page 11 of 17 FirstFirst ... 910111213 ... LastLast

Similar Threads

  1. Need Help In JavaScript
    By Zash in forum Programming
    Replies: 1
    Last Post: 10 September, 2010, 19:08 PM
  2. Javascript
    By Sbfc_ in forum Community Building
    Replies: 5
    Last Post: 19 March, 2010, 01:21 AM
  3. Javascript
    By KMRock in forum Programming
    Replies: 0
    Last Post: 29 July, 2009, 02:02 AM
  4. [WTH] $$ for Simple Javascript
    By MarxGrayscaleServices in forum Services
    Replies: 2
    Last Post: 31 May, 2009, 20:31 PM
  5. Use PHP functions in JavaScript
    By ankit in forum Programming
    Replies: 3
    Last Post: 31 May, 2009, 11:12 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •