PHP Classes

File: ajax.js

Recommend this page to a friend!
  Classes of Pierre-Henry Soria   PHP AJAX Character Counter   ajax.js   Download  
File: ajax.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP AJAX Character Counter
Count characters in a text input using AJAX
Author: By
Last change:
Date: 8 months ago
Size: 408 bytes
 

Contents

Class file image Download
/* * Author: Pierre-Henry Soria <ph7software@gmail.com> * Copyright: (c) 2012-2014, Pierre-Henry Soria. All Rights Reserved. * License: GNU General Public License <http://www.gnu.org/licenses/gpl.html> */ $("#characters").keyup(function(){countCharacters($(this).val())});function countCharacters(a){$.post("ajax.php",{characters:a},function(a){$("#nb_characters").html(a)})};