JavaScript


Friday, October 26th, 2007

Running CPU Intensive JavaScript Computations in a Web Browser

Category: Gears, JavaScript

Julien Lecomte has written up the pattern where you use setTimeout() to keep yielding control back to the main thread so that it can handle browser events. Completion Callback < View plain text > javascript function doSomething (callbackFn [, additional arguments]) {     // Initialize a few things here…     (function () { Read the rest…

Posted by Dion Almaer at 7:21 am
9 Comments

++++-
4.3 rating from 71 votes

Prototype and jQuery: A code comparison

Category: JavaScript, jQuery, Library, Prototype

Remy Sharp has gone through the jQuery and Prototype frameworks, which are probably the two closest to each other, and has done a side by side comparison of the frameworks by showing you how similar things work on both. The presentation looks into the utility functions, selectors, DOM manipulation, DOM walking, events, Ajax transport, and Read the rest…

Posted by Dion Almaer at 6:06 am
50 Comments

++++-
4 rating from 320 votes

Wednesday, October 24th, 2007

Preventing spam with drag and drop

Category: Examples, JavaScript, Library

I just saw a fun little solution to spam prevention that will truly annoy your users. The drop comment solution uses jQuery and its drag and drop support to require that you move your comment over to the drop zone before the comment is saved. I also recently talked about how Passpack lets you click Read the rest…

Posted by Dion Almaer at 8:52 am
35 Comments

++---
2.9 rating from 56 votes

Tuesday, October 23rd, 2007

JDA Mashup Editor

Category: JavaScript, Showcase, Utility

Peter Svensson has written a Web-based mashup editor JDA Composer. The Composer uses JDA itself, and lets you build blocks using Blueprints. You can take it for a drive, or watch the screencast. Features Visual design of page/gadget UI Basic styling in place (colors, fonts, background images) Using openJacobs draw2d graph library for UI creation Read the rest…

Posted by Dion Almaer at 7:09 am
25 Comments

+----
1.6 rating from 85 votes

FitFlash: Make that rectangle move

Category: Flash, JavaScript, Library, Tip

You have seen the pain when you resize a browser and the Flash rectangle doesn’t move. FitFlash is a smart script that resizes your flash automatically if your browser window size is smaller or greater than your flash minimum desired size keeping it accessible independent of screen resolution. It is trivial to use, you just Read the rest…

Posted by Dion Almaer at 5:04 am
3 Comments

+++--
3.7 rating from 34 votes

ECMAScript 4 Language Overview Final Draft

Category: JavaScript

The final draft for the language overview of ECMAScript 4 has been released. This is not the spec itself, but the starter overview document. The fourth edition of the ECMAScript language (ES4) represents a significant evolution of the third edition language (ES3), which Ecma approved as the standard ECMA-262 in 1999. ES4 is compatible with Read the rest…

Posted by Dion Almaer at 12:01 am
30 Comments

++++-
4.5 rating from 51 votes

Monday, October 22nd, 2007

JSLoader: On Demand JavaScript Libraries

Category: JavaScript, Library

Dov B. Katz has released JSLoader, his open source on-demand JavaScript library. He explained to us: It provides a methodology for organizing JS libraries, and programmatically loading them by simply “asking” for them. Example code: JSLoader.load(“ria”,”ext”,”2.0-beta1”); I developed it as a mechanism to provide hosted Ajax libraries within a large enterprise (zero install, we maintain Read the rest…

Posted by Dion Almaer at 9:25 am
31 Comments

++++-
4.2 rating from 53 votes

A little Flickr hacking (in a good way)

Category: JavaScript

Christian Heilmann is at it again posting an entry about a neat method of grabbing Flickr photos without having to using the Flickr API: Here you’ll learn how to get Flickr photos into your JavaScript solutions without having to resort to using the full API. As this is a hack you will only get the Read the rest…

Posted by Rey Bango at 8:50 am
9 Comments

++++-
4.3 rating from 21 votes

ShadedBorder Updated

Category: CSS, Design, JavaScript

Steffen Rusitschka has released an update to ShadedBorder. You can now use gradients and the library degrades gracefully. You can see this all at work: < View plain text > javascript var linksBorder = RUZEE.ShadedBorder.create({ corner:10, border:2 }); var linkBorder = RUZEE.ShadedBorder.create({ shadow:4 });   linksBorder.render(‘links’); linkBorder.render($(‘links’).getElementsByTagName(‘a’));

Posted by Dion Almaer at 6:13 am
2 Comments

+++--
3.4 rating from 22 votes

Friday, October 19th, 2007

Blog.gears: An offline Blogger client using the new GData Blogger JavaScript Client

Category: Examples, Gears, Google, JavaScript, Screencast, Showcase

I was excited when Google announced their first JavaScript API that allows you to write back to a service. Now, they have released a Blogger client that does the same, which means that you can now manipulate your blog posts directly from JavaScript. Along with the release there are a few examples such as: A Read the rest…

Posted by Dion Almaer at 5:37 pm
2 Comments

++++-
4 rating from 24 votes

JavaScript Mouse Move Logger

Category: JavaScript, Library

Marcel Oelke has resurrected some code that he wrote to record mouse movement using JavaScript and Ajax. The “movelogger” records the mouse movement a users does on a web site. Just before the user leaves the current page, the recorded data get posted back to the server using Ajax. The cool thing is that you Read the rest…

Posted by Dion Almaer at 11:09 am
19 Comments

+++--
3.2 rating from 20 votes

Thursday, October 18th, 2007

Google Analytics expands tracking capabilities

Category: Ajax, Flash, Google, JavaScript

VentureBeat is reporting that Google has updated their popular Google Analytics service to begin tracking Ajax and Flash-based requests: The new additions reflect a growing feeling on the web that pageviews are a less important metric than they used to be. Google Analytics is opening a feature for beta testing that tracks user engagement with Read the rest…

Posted by Rey Bango at 7:00 am
8 Comments

+++--
3 rating from 48 votes

PackR: Rails Packing

Category: JavaScript, Rails, Utility

James Coglan has produced a Rails plugin to handle Dean Edwards Packer. PackR allows you to programatically compress: < View plain text > ruby # Create a new instance of Packr first packr = Packr.new compressed = packr.pack(script)   # Pass options to control the type of compression compressed = packr.pack(script, :shrink_vars => true) compressed Read the rest…

Posted by Dion Almaer at 6:26 am
6 Comments

++---
2.3 rating from 34 votes

Companion.JS: IE Debugging, now supports console.log

Category: JavaScript, Utility

Jean-Fabrice Rabaute has released Companion.JS, an IE debugger that features: Detailled javascript error reporting (call stack and real file name where the error occured). “Firebug”-like Console API feature. Javascript console feature useful to inspect javascript objects at runtime. A toolbar icon to open the Companion.JS panel.

Posted by Dion Almaer at 1:23 am
14 Comments

+++--
3 rating from 59 votes

Wednesday, October 17th, 2007

Re-inventing XMLHttpRequest: Cross-browser implementation with sniffing capabilities

Category: Ajax, JavaScript, Library

Sergey Ilinsky has written up an article on an XMLHttpRequest implementation wrapper that provides an equal XHR playground across the various browsers. If you use the wrapper you can fix things like: Internet Explorer: memory leak in XMLHttpRequest Gecko: missing readystatechange calls in synchronous requests Gecko: unnecessary readystatechange DONE when request aborted Gecko: Annoying <parsererror…>…</parsererror> Read the rest…

Posted by Dion Almaer at 8:18 am
7 Comments

+++--
3 rating from 54 votes

Dealing with the Flexibility of JavaScript

Category: Articles, JavaScript

Neil Roberts has written a piece on Dealing with the Flexibility of JavaScript which delves into functions that are overloaded based on signature. For example: < View plain text > javascript connect = function(/*…*/){   if(arguments.length == 1){     var ao = arguments[0];   }else{     var ao = interpolateArgs(arguments, true);   } Read the rest…

Posted by Dion Almaer at 7:47 am
6 Comments

++---
2.3 rating from 33 votes