JavaScript


Friday, March 13th, 2009

What is PhoneGap?

Category: JavaScript, Mobile

Ben and I have been promoting PhoneGap as a great solution for Web developers to create applications with the technology they know and love, without having to jump off of the cliff to other proprietary worlds. PhoneGap is still new, but gets more impressive every day. The team is getting more interested, and put together Read the rest…

Posted by Dion Almaer at 6:27 am
12 Comments

+++--
3.9 rating from 23 votes

Custom info windows with jQuery and Google Maps

Category: JavaScript, Mapping

Ben Nolan has a writeup on a new feature in his Weheartplaces application that tweaks the info popup that comes with Google Maps by using a custom overlay. He walks us through an example that ends up with an Infowin class like this: < View plain text > javascript // Infowin class for displaying a Read the rest…

Posted by Dion Almaer at 5:11 am
2 Comments

+++--
3.2 rating from 54 votes

Thursday, March 12th, 2009

Object Oriented Event Handling and Widgets

Category: JavaScript, jQuery

Paul Chiu, author of Passbook, has written up his thoughts on reuse for widgets in large Ajax applications. The solution? For Passbook I decided to solve this problem once and for all. The solution I believe is in objectifying page elements as a block so that a panel with an edit and delete button can Read the rest…

Posted by Dion Almaer at 6:21 am
Comment here

+++--
3.2 rating from 32 votes

DOMLint: Checking for Form Conflicts

Category: JavaScript, Utility

A few days ago, Prototype developer Juriy Zaytsev announced a new utility, DOMLint. It aims to solve an obscure but important problem with forms and JavaScript: Form controls, for example, can be accessed by their “name” through property access of <form> element… What happens if we try to access an element whose name matches a Read the rest…

Posted by Ben Galbraith at 6:00 am
2 Comments

+++--
3.6 rating from 17 votes

APNG Class: Get APNG going on all browsers

Category: JavaScript, Library, MooTools, UI, Utility

Guillermo Rauch, who has a really nice looking site at devthought has created APNG a class to bootstrap animating PNG images: APNG provides simple frame-based animation functionality. It’s main goal is solve the problem of animating alpha-transparent images (PNG format). Features APNG is very flexible when it comes to the method of displaying the various Read the rest…

Posted by Dion Almaer at 4:29 am
16 Comments

+++--
3.3 rating from 17 votes

Wednesday, March 11th, 2009

Showing progress with the Safari 4 multiple file upload

Category: Browsers, JavaScript, PHP

Andrea Giammarchi has taken the new Safari 4 implementation of multi input file upload functionality and has written an article on how to write the client and server to enable this. He shares the new XHR implementation: < View plain text > javascript var xhr = new XMLHttpRequest,     upload = xhr.upload; upload.onload = Read the rest…

Posted by Dion Almaer at 7:11 am
9 Comments

+++--
3.9 rating from 17 votes

Digging a real OO class system with jQuery

Category: JavaScript, Library

Micah Snyder of Digg has released a plugin for jQuery that gives it an OO Class-like model: At Digg we use jQuery extensively, but it doesn’t offer a much in the way of Object-Oriented JavaScript. Existing OOJS libraries weren’t a good fit — often trying to shoehorn traditional OOP patterns in where they don’t quite Read the rest…

Posted by Dion Almaer at 5:27 am
12 Comments

++---
2.3 rating from 67 votes

Tuesday, March 10th, 2009

DataTables: Major update to the highly flexible data table component

Category: JavaScript, jQuery

Allan Jardine has updated his popular DataTables rich data grid control. Allan told us what his aims were for this 1.4.1 release: Being fairly happy with the options that DataTables presents to the end user, I’ve focused this release on providing tools for the developer. A plug-in API, non-destructive DOM manipulation (the biggest weak point Read the rest…

Posted by Dion Almaer at 6:46 am
4 Comments

+++--
3.7 rating from 40 votes

Monday, March 9th, 2009

Dojo 1.3 is coming

Category: Dojo, JavaScript

Alex Russell has posted on Dojo 1.3b3 which we have actually been using on Bespin. So why should you be switching to Dojo or upgrading to 1.3? You can dig through the nearly 500 fixed bugs or the tentative release notes yourself, but broadly speaking, we’ve hit all of our major stated targets for 1.3: Read the rest…

Posted by Dion Almaer at 6:39 am
2 Comments

+++--
3.9 rating from 32 votes

Thursday, March 5th, 2009

Accessing the system clipboard from Web applications

Category: Bespin, JavaScript

We had a subtly different use case for accessing the system clipboard. The Flash backdoor no longer works, so I took a step back at the landscape for accessing the system landscape and wrote up some of the items. The landscape of clipboard API access, hidden text areas, on[cut|copy|paste] events, zeroclipboard, and on and on. Read the rest…

Posted by Dion Almaer at 1:56 am
1 Comment

++++-
4.2 rating from 18 votes

The Art of Throwing Errors in JavaScript

Category: Debugging, JavaScript

Nicholas Zakas recently wrote a piece covering the basics of throwing errors in JavaScript: You can throw an by using the throw operator and providing an object to throw. Any type of object can be thrown, however, an Error object is the most typical to use: < View plain text > js throw new Error("Something Read the rest…

Posted by Ben Galbraith at 12:52 am
25 Comments

++++-
4 rating from 24 votes

Wednesday, March 4th, 2009

Detect if the browser supports APNG

Category: Canvas, JavaScript, Library

< View plain text > javascript (function(_global) {     var apng_test = new Image(),     canvas = document.createElement("canvas"),     ctx = canvas.getContext("2d");     apng_test.src = "apng-test.png"; // a data URI will cause a security error so you _have_ to link to external resource     // frame 1 (skipped on apng-supporting Read the rest…

Posted by Dion Almaer at 7:00 am
13 Comments

++---
2.9 rating from 28 votes

Map Reduce in the browser

Category: JavaScript

Ilya Grigorik of Igvita has proposed and built a collaborative Map Reduce system in JavaScript that allows browsers to dive in and use their CPU to do some things. On the JavaScript side you can do something like: < View plain text > javascript function map() {         /* count the number Read the rest…

Posted by Dion Almaer at 6:59 am
4 Comments

++---
2.7 rating from 25 votes

Tuesday, March 3rd, 2009

QFocuser

Category: Accessibility, JavaScript, Library

Daniel Steigerwald has written a nice little standalone library for accessibility called QFocuser. It features: allow to your widget to listen key events when its focused focus can be enabled on any element fires focus and blur events (so your table row will NOT remain highlighted after click out of table for example) make your Read the rest…

Posted by Dion Almaer at 6:58 am
5 Comments

+++--
3.9 rating from 30 votes

Monday, March 2nd, 2009

Secret: Time for some Monday fun

Category: Fun, JavaScript

Allan Jardine, a chap who I am a big fan of as he does great work, has a bit of Friday fun that I couldn’t resist putting up on a Monday. He has created Secret “a Javascript library which provides the functions required for scanning an HTML document for certain characters, locating those characters on Read the rest…

Posted by Dion Almaer at 4:01 am
7 Comments

+++--
3.7 rating from 26 votes

Friday, February 27th, 2009

TraceVis: Getting some eyes into TraceMonkey

Category: JavaScript

David Mandelin has announcedTraceVis “a visualization of TraceMonkey performance, with the goal of revealing what the JS VM is doing, and why it runs certain programs fast or slow, so we can figure out how to make the slow ones fast too.” David starts off explaining what TraceMonkey is about, and pieces together the activities: Read the rest…

Posted by Dion Almaer at 6:55 am
1 Comment

++++-
4.4 rating from 27 votes