JavaScript


Monday, February 18th, 2008

Liberator Comet Platform: Free Edition

Category: Comet, Java, JavaScript, Library

Caplin Systems, creator of the Liberator Comet platform have announced a free version which can be used for non-commercial applications and for evaluation. Liberator includes a high-performance Comet server, a JavaScript client library, and a Java server integration library. There are many examples such as the subscriptions sample which shows a page with realtime updating Read the rest…

Posted by Dion Almaer at 5:25 am
2 Comments

+++--
3.8 rating from 26 votes

Friday, February 15th, 2008

Using setTimeout to Solve DOMContentLoaded?

Category: JavaScript

Stuart Colville was reading the following info on setTimeout() from JavaScript the Definitive Guide: “In practice, setTimeout() tells the browser to invoke the function when it has finished running the event handlers for any currently pending events and has finished updated the current state of the document” He then thought, does setTimeout solve the DOMContentLoaded Read the rest…

Posted by Dion Almaer at 8:13 am
7 Comments

+++--
3.5 rating from 23 votes

newjs: JavaScript Project Creation

Category: JavaScript, Testing, Utility

When you start a new JavaScript library, how do you layout the source files, the tests, the distribution files? Do you have support scripts to generate distributions from source files? Run your JavaScript unit tests? Generators to create new unit test HTML files? This is why Dr. Nic created newjs, a Ruby script that sets Read the rest…

Posted by Dion Almaer at 7:36 am
Comment here

+++--
3.4 rating from 18 votes

Dual-Side Templating for 2010

Category: JavaScript

Michael Mahemoff is bullish on templating that runs all over the shop, and explained the progression in his Dual-Side Templating piece: c. 1995: Server-Side Templating. This is the standard templating used in Java’s JSP, Perl’s Mason, PHP, ASP, etc. ie some html code with <?= “language” ?> code embedded in it. c. 2005: Browser-Side Templating. Read the rest…

Posted by Dion Almaer at 5:58 am
12 Comments

++---
2.7 rating from 23 votes

Thursday, February 14th, 2008

Moo.rd: Extensions to MooTools

Category: JavaScript, Library, MooTools

Moo.rd is an extension library to MooTools that brings you more effects, and helpers for tables, lists, and lightboxes. You can see examples of the new extensions including: Custom Alert Custom Confirm Smooth Scrolling The new Custom.Alert and Custom.Confirm classes are modal, fixed, and can be draggable, like the standards. But they are “Custom”, so Read the rest…

Posted by Dion Almaer at 6:36 am
9 Comments

+----
1.2 rating from 50 votes

OnionML: Server Side JavaScript Layout Engine

Category: CSS, Framework, JavaScript

Marcello Bastéa-Forte has developed OnionML, a layout template language that uses server side JavaScript with Rhino and E4X on the back end. The high-level goal of the template engine is to be something with utility not unlike CSS, but for intended layout and composition. The actual functionality is similar to XSLT, but with the design Read the rest…

Posted by Dion Almaer at 6:27 am
1 Comment

+++--
3.7 rating from 32 votes

Wednesday, February 13th, 2008

Prototype Deprecation.js: 1.5 to 1.6 made easier

Category: JavaScript, Library, Prototype

Tobie Langel has developed a deprecation script to help you move from Prototype 1.5 to 1.6: When your code calls a method that’s been deprecated, replaced, or modified, the script will log a warning or error to your Firebug console. Clicking its hyperlink will take you to the deprecation script itself, which isn’t all that Read the rest…

Posted by Dion Almaer at 8:47 am
3 Comments

++++-
4.5 rating from 33 votes

Is easy implementation the same as good code?

Category: Accessibility, Examples, JavaScript, Security, Unobtrusive JS

I’ve just come across a solution for badges on web sites that makes it terribly easy for implementers. The idea is that the implementer could add a badge wherever they want in an HTML document, choose the look and feel and add a message to be shown. The implementation code is the following: < View Read the rest…

Posted by Chris Heilmann at 7:45 am
12 Comments

+++--
3.2 rating from 26 votes

Sun.com Behaviour Registration Library

Category: JavaScript, Library

Greg Reimer has followed up and posted on the new event delegation library that he is using on Sun.com. The library provides one object, reg which lets you hook behaviour via: < View plain text > javascript reg.click(‘ul.foo > li > a.bar’, myFunction); What is happening Once that bit of code runs, regardless of whether Read the rest…

Posted by Dion Almaer at 6:52 am
2 Comments

+++--
3.5 rating from 17 votes

Crazy way to change third party scripts

Category: JavaScript, Tip

Paul Irish posted a crazy method for tweaking third party scripts. His problem was that he was using MultiMap (online Mapping API) and wanted to internationalize the information, but it was hard coded in the JavaScript. To get around the problem he does this: < View plain text > javascript // WARNING!!  This is such Read the rest…

Posted by Dion Almaer at 6:22 am
5 Comments

+++--
3.4 rating from 18 votes

Extending dojo.query()

Category: CSS, Dojo, JavaScript

Alex Russell has taken some time to share the path you take when you go the Dojo Way and “build with, not on”. He posted an example of how to extend dojo.query() which walks through the steps: Step 1: grok dojo.NodeList dojo.NodeList is the Array subclass which all dojo.query() calls return an instance of. Therefore, Read the rest…

Posted by Dion Almaer at 2:36 am
Comment here

+++--
3.5 rating from 19 votes

Tuesday, February 12th, 2008

Ajax Interceptor: Have someone clean for you

Category: JavaScript, Library

José Manuel Alarcón Aguín has written AJAXInterceptor, a JavaScript library that you add which takes over form submissions and makes them happen asynchronously with XHR. You can also control progress indicators and request cancelation via code such as: < View plain text > HTML <div id="progress">   <img src="progressimgs/bigrotation2.gif" alt="Loading…" align="middle" hspace="10" /> Loading…   Read the rest…

Posted by Dion Almaer at 6:29 am
Comment here

+++--
3 rating from 29 votes

The parseInt gotcha

Category: JavaScript, Tip

Guyon Morée has posted the old chesnut parseInt gotcha, so I thought I should put it up here as a quick tip: I was working on some stuff in javascript which involved some date/string parsing when one morning it failed. “That’s weird, yesterday it worked fine!” After some debugging with FireBug I found parseInt() was Read the rest…

Posted by Dion Almaer at 5:11 am
25 Comments

++---
2.6 rating from 41 votes

Monday, February 11th, 2008

JSJaC: JavaScript Jabber Client Library

Category: JavaScript, Library

JSJaC is a JavaScript Jabber Client Library that was built “to ease implementation of web based jabber clients. For communication with a jabber server it needs to support either HTTP Polling or HTTP Binding.” To use the library you can check out examples to see how you can do things like send a message: < Read the rest…

Posted by Dion Almaer at 7:58 am
4 Comments

++++-
4.2 rating from 39 votes

Cross Window Messaging with HTML 5 postMessage

Category: Browsers, HTML, JavaScript

John Resig has written a Cross-Window Messaging sample using Firefox 3, which implements the current postMessage API in HTML 5. Opera 9 implements a slightly older version, and a new release will fix that of course: This particular API adds a new method to every window (including the current window, popups, iframes, and frames) that Read the rest…

Posted by Dion Almaer at 6:20 am
2 Comments

++++-
4.2 rating from 34 votes

Friday, February 8th, 2008

ArcLite: Arc for JavaScript

Category: JavaScript

Jonathan Tang has fallen into the Arc fun and took some time to fully implement it in JavaScript. It differs from Paul’s implementation: Supports Unicode, at least as well as JavaScript supports it. There are very few I/O primitives – the ones that do exist write to the string “Eval.stdout”, which can be tested and Read the rest…

Posted by Dion Almaer at 9:12 am
2 Comments

++---
2.5 rating from 15 votes