Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

Closed Thread
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 23
  1. #11

    Default Helpful JavaScripts to develop website

    JavaScript codes for Web DEV

    Simple JavaScript Number Formatter

    This JavaScript code example provides us two functions to clean up and format numbers quite nicely.

    One JavaScript check number function will take any decima... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup

    Step 1: Copy & Paste JavaScript code below in your HEAD section
    JavaScript
    Code:
    <script type="text/javascript">
    // Created by: Justin Barlow | http://www.netlobo.com/
    // This script downloaded from www.JavaScriptBank.com
    
    // This function formats numbers by adding commas
    function numberFormat(nStr){
      nStr += '';
      x = nStr.split('.');
      x1 = x[0];
      x2 = x.length > 1 ? '.' + x[1] : '';
      var rgx = /(\d+)(\d{3})/;
      while (rgx.test(x1))
        x1 = x1.replace(rgx, '$1' + ',' + '$2');
      return x1 + x2;
    }
    
    // This function removes non-numeric characters
    function stripNonNumeric( str ){
      str += '';
      var rgx = /^\d|\.|-$/;
      var out = '';
      for( var i = 0; i < str.length; i++ ){
        if( rgx.test( str.charAt(i) ) ){
          if( !( ( str.charAt(i) == '.' && out.indexOf( '.' ) != -1 ) ||
                 ( str.charAt(i) == '-' && out.length != 0 ) ) ){
            out += str.charAt(i);
          }
        }
      }
      return out;
    }
    </script>
    Step 2: Copy & Paste HTML code below in your BODY section
    HTML
    Code:
    <div>
    			numberFormat():<br>
    
    			<form method="get" onsubmit="javascript:return false;">
    				<input type="text" onkeyup="javascript:document.getElementById('numFormatResult').innerHTML = numberFormat( this.value );">
    
    				<input type="reset" value="clear">
    			</form>
    			<span id="numFormatResult"></span>
    			<br><br>
    			stripNonNumeric():<br>
    			<form method="get" onsubmit="javascript:return false;">
    
    				<input type="text" onkeyup="javascript:document.getElementById('numStripResult').innerHTML = stripNonNumeric( this.value );">
    				<input type="reset" value="clear">
    
    			</form>
    			<span id="numStripResult"></span>
    			<br><br>
    			stripNonNumeric() then numberFormat():<br>
    			<form method="get" onsubmit="javascript:return false;">
    				<input type="text" onkeyup="javascript:document.getElementById('numBothResult').innerHTML = numberFormat( stripNonNumeric( this.value ) );">
    
    				<input type="reset" value="clear">
    			</form>
    
    			<span id="numBothResult"></span>
    		</div>





    JavaScript Countdown Timer - JavaScript Web based Music Player - Free JavaScript Codes
    Quote Originally Posted by Copyright
    The Site may provide, or third parties may provide, links to non-JavaScriptBank.com Internet World Wide Web sites or resources. Because JavaScriptBank.com has no control over such sites and resources, you acknowledge and agree that JavaScriptBank.com is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. You further acknowledge and agree that JavaScriptBank.com shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, ***** or services available on or through any such site or resource.

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #12

    Default JavaScript codes for Web DEV

    Free JavaSccript codes

    Better JavaScript Minification

    JavaScript minify (JS minify) is one of most important tasks if you would like to care about web performance. Today, jsB@nk would like to shows you a JavaScript article tutor... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup






    JavaScript Line Graph script - JavaScript Virtual Keyboard - JavaScript Horizontal Slider
    Quote Originally Posted by Copyright
    The Site may provide, or third parties may provide, links to non-JavaScriptBank.com Internet World Wide Web sites or resources. Because JavaScriptBank.com has no control over such sites and resources, you acknowledge and agree that JavaScriptBank.com is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. You further acknowledge and agree that JavaScriptBank.com shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, ***** or services available on or through any such site or resource.

  4. #13

    Default Helpful JavaScript for Web development

    Helpful JavaScript for Web development

    HOT New JavaScript APIs with HTML5

    In this JavaScript article tutorial, we're together to enjoy awesome experiments on HTML5 with new hot JavaScript APIs. With a lot of JavaScript/Web application live demos in this JavaScript HTML5 tut... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup






    JavaScript Countdown Timer - JavaScript Web based Music Player - Free JavaScript Codes
    Quote Originally Posted by Copyright
    The Site may provide, or third parties may provide, links to non-JavaScriptBank.com Internet World Wide Web sites or resources. Because JavaScriptBank.com has no control over such sites and resources, you acknowledge and agree that JavaScriptBank.com is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. You further acknowledge and agree that JavaScriptBank.com shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, ***** or services available on or through any such site or resource.

  5. #14

    Default Good and Nice JavaScripts

    Free JavaSccript codes

    Amazing and Cool HTML Tooltips with JavaScript-jQuery

    HTML tooltips are the indispensable things on the layout of any website. They may provide more information to our readers without breaking the web designs. Most basic and ... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup






    JavaScript Countdown Timer - JavaScript Web based Music Player - Free JavaScript Codes
    Quote Originally Posted by Copyright
    The Site may provide, or third parties may provide, links to non-JavaScriptBank.com Internet World Wide Web sites or resources. Because JavaScriptBank.com has no control over such sites and resources, you acknowledge and agree that JavaScriptBank.com is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. You further acknowledge and agree that JavaScriptBank.com shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, ***** or services available on or through any such site or resource.

  6. #15

    Default Helpful JavaScripts to develop website

    Helpful JavaScript for Web development

    JavaScript Objects: Compare and Clone

    This JavaScript article tutorial shows you a short overview about JavaScript objects in comparing and cloning. You'll know how to clone JavaScript objects, make... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup






    JavaScript Countdown Timer - JavaScript Web based Music Player - JavaScript AJAX Page Content Loader
    Quote Originally Posted by Copyright
    The Site may provide, or third parties may provide, links to non-JavaScriptBank.com Internet World Wide Web sites or resources. Because JavaScriptBank.com has no control over such sites and resources, you acknowledge and agree that JavaScriptBank.com is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. You further acknowledge and agree that JavaScriptBank.com shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, ***** or services available on or through any such site or resource.

  7. #16

    Default Good and Nice JavaScripts

    Free JavaSccript codes

    JavaScript Add More Unlimited Input Fields

    The type of this JavaScript effect can be seen on many upload-allowance sites, such as Youtube, Flickr, ImageShack, Picasa, etc. That's your visitors can upload files through this JavaScript code, aft... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup

    Step 1: CSS below for styling thescript, place it into 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
    */
    #imageUpload input {
    	display: block;
    }
    </style>
    Step 2: Copy & Paste JavaScript code below in your HEAD section
    JavaScript
    Code:
    <script type="text/javascript">
    // Created by: Jeroen Haan | http://www.haan.net
    // This script downloaded from JavaScriptBank.com
    
    function fileFields() {
    	 var x = document.getElementById('imageUpload');
    	 x.onclick = function() {
      		var i = parseFloat(this.lastChild.id)+1;
      		input = document.createElement("input");
      		input.setAttribute("type", "file");
      		input.setAttribute("name", 'imageName_' + i);
      		input.setAttribute("id", i);
      		this.appendChild(input);
    	 }
    }
    
    // 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() {
      fileFields();
    });
    </script>
    Step 3: Copy & Paste HTML code below in your BODY section
    HTML
    Code:
    <a href="#" id="imageUpload"><input type="file" name="imageName_1" id="1" /></a>





    Javascript floating message - Javascript multi level drop down menu - JavaScript in_array()
    Quote Originally Posted by Copyright
    The Site may provide, or third parties may provide, links to non-JavaScriptBank.com Internet World Wide Web sites or resources. Because JavaScriptBank.com has no control over such sites and resources, you acknowledge and agree that JavaScriptBank.com is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. You further acknowledge and agree that JavaScriptBank.com shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, ***** or services available on or through any such site or resource.

  8. #17

    Default Helpful JavaScript for Web development

    Helpful JavaScripts to develop website

    Browser Cookie with JavaScript and jQuery

    This short JavaScript article tutorial guides you how to work with browser cookie, cookie in JavaScript by using the JavaScript framework jQuery, through some basi... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup






    JavaScript Countdown Timer - JavaScript Web based Music Player - JavaScript AJAX Page Content Loader
    Quote Originally Posted by Copyright
    The Site may provide, or third parties may provide, links to non-JavaScriptBank.com Internet World Wide Web sites or resources. Because JavaScriptBank.com has no control over such sites and resources, you acknowledge and agree that JavaScriptBank.com is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. You further acknowledge and agree that JavaScriptBank.com shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, ***** or services available on or through any such site or resource.

  9. #18

    Default Helpful JavaScript for Web development

    Helpful JavaScripts to develop website

    JavaScript Color Gradient Maker

    With this JavaScript code example, you can easy make CSS gradient background, [URL="http://www.javascriptbank.com/=JavaScript color gradient"]JavaScript color gradient</a... 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">
    // Created by: Joseph Myers | http://www.codelib.net/
    // This script downloaded from www.JavaScriptBank.com
    
    function colorscale(hexstr, scalefactor) {
    /* declared variables first, in order;
      afterwards, undeclared local variables */
      var r = scalefactor;
      var a, i;
      if (r < 0 || typeof(hexstr) != 'string')
        return hexstr;
        hexstr = hexstr.replace(/[^0-9a-f]+/ig, '');
        if (hexstr.length == 3) {
        a = hexstr.split('');
      } else if (hexstr.length == 6) {
        a = hexstr.match(/(\w{2})/g);
      } else
        return hexstr;
      for (i=0; i<a.length; i++) {
        if (a[i].length == 2)
          a[i] = parseInt(a[i], 16);
        else {
          a[i] = parseInt(a[i], 16);
          a[i] = a[i]*16 + a[i];
      }
    }
    
    var maxColor = parseInt('ff', 16);
    
    function relsize(a) {
      if (a == maxColor)
      return Infinity;
      return a/(maxColor-a);
    }
    
    function relsizeinv(y) {
      if (y == Infinity)
      return maxColor;
      return maxColor*y/(1+y);
    }
    
    for (i=0; i<a.length; i++) {
      a[i] = relsizeinv(relsize(a[i])*r);
      a[i] = Math.floor(a[i]).toString(16);
      if (a[i].length == 1)
      a[i] = '0' + a[i];
    }
    return a.join('');
    }
    
    function showrainbow(f) {
      var colorcell, hex, i, nhex;
      hex = f.orig.value;
      hex = hex.replace(/\W/g, '');
      nhex = colorscale(hex, f.scalef.value-0);
      if (nhex != hex) {
        f.outp.value = nhex;
        colorcell = document.getElementById('origcolor');
        i = document.getElementById('newcolor');
        colorcell.style.background = '#' + hex;
        i.style.background = '#' + nhex;
        for (i=0; i<256; i++) {
          colorcell = document.getElementById('colorcell'+i);
          nhex = colorscale(hex, i/(256-i));
          colorcell.style.background = '#' + nhex;
          colorcell.nhexvalue = nhex;
        }
      }
    }
    </script>
    Step 2: Place HTML below in your BODY section
    HTML
    Code:
    <div style="width: 400px;">
    <form>
    <p>
    Original color: <input type="text" name="orig" value="339990"><br>
    Scale factor: <input type="text" name="scalef" value="4"><br>
    <input type="button" value="Output" onclick="showrainbow(this.form)">
    <input type="text" readonly name="outp" style="border: none;">
    </p>
    </form>
    
    <table width="150">
    <tr>
    <td width="50%" height="50" id="origcolor">Original</td>
    <td width="50%" id="newcolor">New</td></tr>
    </table>
    
    <table cellpadding="0" cellspacing="0">
    <tr>
    <script type="text/javascript">
    for (i=0; i<256; i++)
    document.write('<td width="10" height="50" id="colorcell', i, '" onclick="document.forms[0].outp.value = this.nhexvalue"></td>');
    </script>
    </tr>
    </table>
    
    </div>





    JavaScript Vertical Marquee - JavaScript DHTML analog clock - JavaScript Backwards Text
    Quote Originally Posted by Copyright
    The Site may provide, or third parties may provide, links to non-JavaScriptBank.com Internet World Wide Web sites or resources. Because JavaScriptBank.com has no control over such sites and resources, you acknowledge and agree that JavaScriptBank.com is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. You further acknowledge and agree that JavaScriptBank.com shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, ***** or services available on or through any such site or resource.

  10. #19

    Default Helpful JavaScripts to develop website

    Good and Nice JavaScripts

    Built-in JavaScript RegEx APIs

    Regular Expressions (RegEx) skills are the indispensable knowledges if you would like become a professional JavaScript coder particularly, or a professional programmer generally; because of a lot of p... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup






    JavaScript Countdown Timer - JavaScript Web based Music Player - Free JavaScript Codes
    Quote Originally Posted by Copyright
    The Site may provide, or third parties may provide, links to non-JavaScriptBank.com Internet World Wide Web sites or resources. Because JavaScriptBank.com has no control over such sites and resources, you acknowledge and agree that JavaScriptBank.com is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. You further acknowledge and agree that JavaScriptBank.com shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, ***** or services available on or through any such site or resource.

  11. #20

    Default Helpful JavaScript for Web development

    Free JavaSccript codes

    JavaScript OOP with Input Display Toggle

    Usage of this JavaScript code effect is just toggle (show/display) the input text fields when the users click the specified input checkboxes. But this JavaScript code example made with OOP skills, it'... detail at JavaScriptBank.com - 2.000+ free JavaScript codes


    How to setup

    Step 1: Copy & Paste JavaScript code below in your HEAD section
    JavaScript
    Code:
    <script type="text/javascript">
    // Created by: Fang | http://www.webdeveloper.com/forum/showthread.php?p=872326#post872326
    // This script downloaded from www.JavaScriptBank.com
    
    function addElement() {
    var aInput=document.getElementById('myspan').getElementsByTagName('input');
    for(var i=0; i<aInput.length; i++) {
        aInput[i].onclick=new Function('addDelete(this)');
        }
    }
    
    function addDelete(obj) {
    var parentSpan=document.getElementById('myspan');
    if(obj.nextSibling.nodeName!='INPUT') { // add
        var oInputText=document.createElement('input');
        oInputText.setAttribute('type', 'text');
        parentSpan.insertBefore(oInputText, obj.nextSibling);
        }
    else { // delete
        parentSpan.removeChild(obj.nextSibling);
        }
    }
    
    // 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() {
      addElement();
    });
    </script>
    Step 2: Place HTML below in your BODY section
    HTML
    Code:
    <span id="myspan">
      <input type="checkbox">
    
      <input type="checkbox">
      <input type="checkbox">
    </span>





    JavaScript Enlarge Image - JavaScript Fading Slide Show - JavaScript Rotating Image script
    Quote Originally Posted by Copyright
    The Site may provide, or third parties may provide, links to non-JavaScriptBank.com Internet World Wide Web sites or resources. Because JavaScriptBank.com has no control over such sites and resources, you acknowledge and agree that JavaScriptBank.com is not responsible for the availability of such external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. You further acknowledge and agree that JavaScriptBank.com shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, ***** or services available on or through any such site or resource.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

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
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial