Javascript

Compressed Prototype Javascript Framework

Posted in Javascript on March 7th, 2011 by Zaenal – 1 Comment

Prototype yet to release compressed version of it’s framework. And still, when I will make a compressed version of Prototype version 1.7.0.0, the same error appears in 2 places, near line 1215 and line 1916. After adding the semicolon at that line, the compressed Prototype work flawlessly.
read more »

jQuery Plugin for Checking the Existence of Elements

Posted in Javascript on March 3rd, 2011 by Zaenal – Be the first to comment

Sometime it’s really annoying to repeat some condition check to determines the existence of an element(s) in jQuery.

var foo = $ ('bar');
if (foo.length == 0)
    alert('bar NOT FOUND! ");

read more »

Facebook Like Auto-Suggestion Text Field

Posted in Javascript on April 11th, 2009 by Zaenal M. – 4 Comments
AutoField Snapshoot

AutoField Snapshoot

AutoTextField or autoField is javascript class for creating auto suggestion input field like gmail or facebook, and required prototype.js version 1.6.0 or above. AutoTextField support mouseOver and some key: ENTER, TAB, END, HOME, UP, DOWN and ESCAPE.

Calling the class is simple: add new AutoField(fieldID, options) to the HEAD of HTML. In the example below, the fieldID is ‘compose_to’, with two options: script for Ajax request and className for CSS layout (you can find complete CSS sample for layout in demo page or download file).
read more »

inspectForm: Unobtrusive Form Validation

Posted in Javascript on December 11th, 2008 by Zaenal M. – 1 Comment

This script, inspectForm, required Prototype library version 1.6 and above. Some of the features are:

  • unobtrusive
  • client checking
  • server checking with ajax
  • easy to use
  • easy to hack, adjust, extend, modif

read more »

Video: Secrets of JavaScript Closures

Posted in Javascript on December 6th, 2008 by Zaenal M. – Be the first to comment

A must watch presentation! From Fronteers Conference ‘08, Stuart Langridge talks about closures in JavaScript, the secret and the immense power of closure in Javascript. Bring your brain, and a tolerance for jokes. read more »

Multilingual Javascript Date-Format Class

Posted in Javascript on December 1st, 2008 by Zaenal M. – 4 Comments
PHP strftime and Javascript DateFormat class

PHP strftime and Javascript DateFormat class

For PHP developer, it’s will be nice if we can use same date format parameter both in PHP and Javascript. This DateFormat class created for that purpose, since took strftime like parameter to format the output string. For example passing parameter “%d-%m-%Y” will output “dd-mm-yyyy” date string. See also: PHP strftime manual.

DateFormat has standard version and prototype version. The standard version does not required any other library, because it’s developed under standard Javascript. The prototype version required Prototype library (at least version 1.6). read more »

Compressed prototype.js & scriptaculous.js

Posted in Javascript on November 22nd, 2008 by Zaenal M. – 3 Comments

I compressed both  prototype.js version 1.6.0.2 1.6.1 and scriptaculous.js version 1.8.1 1.8.3 using Javascript Packer by Dean Edward (http://dean.edwards.name/packer/) in one file, and the result is about 95kb. read more »