JavaScript


Tuesday, August 26th, 2008

navigator.geolocation: Using the W3C Geolocation API today

Category: Gears, Google, JavaScript, Mapping, Standards

Last week I wrote a simple WhereAreYou? application that used the Google Ajax APIs ClientLocation API to access your location via your IP address. At the same time, we announced support for the Gears Geolocation API that can calculate your address using a GPS device, WiFi info, cell tower ids, and IP address lookups. Add Read the rest…

Posted by Dion Almaer at 9:14 am
7 Comments

+++--
3.6 rating from 30 votes

Monday, August 25th, 2008

ImageInfo: reading image metadata (EXIF) with JavaScript

Category: JavaScript

Jacob Seidelin finishes up his binary meme with a post on reading image metadata with JavaScript via a library that groks EXIF data. It tries to detect the format of the image file and then reads the header and pulls out information about dimensions and color depth among other things. If the EXIF data library Read the rest…

Posted by Dion Almaer at 6:47 am
2 Comments

+++--
3.9 rating from 24 votes

Sizzle: John Resig has a new selector engine

Category: CSS, JavaScript

John Resig is working on a new selector engine called Sizzle: This is a new selector engine that I’m working on. It’s a work in progress! Not ready for use yet! It’s definitely not ready yet (got some minor outlier bugs in the standards-compliant browsers – and a bunch of major bugs in IE still Read the rest…

Posted by Dion Almaer at 12:48 am
20 Comments

++++-
4.3 rating from 37 votes

Friday, August 22nd, 2008

JavaScript JIT: The Dream Gets Closer (in Firefox)

Category: Firefox, JavaScript

For years, many of us have been salivating over the idea of JIT’ed JavaScript in the browser. Adobe’s JIT’ing Flash VM showed a preview of tremendous speed gains to be had, but we’ve had to wait until SquirrelFish from WebKit to see anything dramatic happen in the browser. Until now. Mozilla just let the cat Read the rest…

Posted by Ben Galbraith at 6:19 pm
16 Comments

++++-
4.7 rating from 64 votes

Emulating onhashchange without setInterval

Category: Ajax, JavaScript

IE 8 has an onhashchange event, and Ajax history / bookmark management has been a long time problem of choice for developers. Zach Leatherman has revisited the problem and has another solution that doesn’t require setInterval to check on the location. On initialization, we load an iframe onto the page that is positioned absolutely at Read the rest…

Posted by Dion Almaer at 7:16 am
10 Comments

+++--
3.9 rating from 29 votes

WARNING: JSLint may continue to hurt your feelings

Category: JavaScript, Utility

JSLint is an old tool in the toolbox, created by Douglas Crockford. I am sure you know about it. But, do you know how often it is updated? You may notice the “Edition 2008-08-18” on the site, which shows that it was updated recently. After being on the jslint group, I see that there are Read the rest…

Posted by Dion Almaer at 6:22 am
2 Comments

+++--
3.8 rating from 23 votes

Wednesday, August 20th, 2008

Making creating DOM-based applications less of a hassle

Category: Framework, JavaScript, Library

Creating a lot of HTML using DOM methods can be a real pain. This is what students of the Juku training course that I held two weeks ago found out quite quickly and complained about the verbosity of it all. I listened to their concerns and came up with a framework for JavaScript applications called Read the rest…

Posted by Chris Heilmann at 11:13 am
13 Comments

+++--
3.2 rating from 23 votes

Running server side processes via JavaScript with Jaxer

Category: Aptana, JavaScript, Server

Tom Kirkpatrick has written about a new API in Jaxer, Jaxer.Process, that allows you to call out to the host operating system. His example has a call out to get the uptime on the machine: < View plain text > javascript <script runat="server-proxy"> function runUptime() {       // run the uptime and return Read the rest…

Posted by Dion Almaer at 10:45 am
1 Comment

+++--
3.9 rating from 21 votes

Tuesday, August 19th, 2008

Reading ID3 tags with JavaScript

Category: Examples, JavaScript, Library

Jacob Seidelin is up to more tricks, this time playing with the binary side of life and writing a library that can reading ID3 tags from MP3 files and such. < View plain text > javascript // URL of the mp3 file (must be on the same domain!) var file = "mymusicfile.mp3";   // define Read the rest…

Posted by Dion Almaer at 10:27 am
10 Comments

+++--
3.1 rating from 34 votes

Getting method_missing, or _noSuchMethod into Harmony

Category: JavaScript

Yehuda Katz saw the Harmony news, and wondered if there was a change to get _noSuchMethod, which currently works in implementations such as SpiderMonkey, into the new JavaScript world of: Harmony = ES3.1++. In summary, it seems that the two groups agreed to focus cooperative effort of ECMAScript 3.1, a modest improvement of the current Read the rest…

Posted by Dion Almaer at 10:17 am
1 Comment

++++-
4 rating from 14 votes

ECMA What? Harmony Who? TC39? Tamarin? JavaScript!

Category: JavaScript

Alex Russell has seen the confusion of the many names that were bandied around with the Harmony news last week. There are so many names, that involve specs, projects, and general technical jargon that it can get a little confusing. Alex has made it very clear: ECMAScript 3 Aka: JavaScript, ES3, ECMAScript 262-3, and JScript. Read the rest…

Posted by Dion Almaer at 7:48 am
11 Comments

++++-
4.4 rating from 24 votes

Monday, August 18th, 2008

A simple solution to the “other” problem with select boxes

Category: Examples, JavaScript, jQuery, Tip

Jeffrey Olchovy has posted a simple tutorial on using jQuery to solve a “select-to-input toggle” that shows and hides a text field when you select “Other”. It overloads the same form name, so the server side gets just one value, and doesn’t know or care if it was in the drop down or typed in. Read the rest…

Posted by Dion Almaer at 5:51 am
10 Comments

+++--
3.3 rating from 47 votes

Getting a JavaScript stracktrace in any browser

Category: JavaScript, Tip

Eric Wendelin has posted on getting a JavaScript stack trace no matter that the browser. With Firebug you can call console.trace() but what about the rest? Luke Smith took Eric’s work and added to it, ending up with: (function () { YOUR_NAMESPACE.getStackTrace = (function () { var mode; try {(0)()} catch (e) { mode = Read the rest…

Posted by Dion Almaer at 5:43 am
1 Comment

++++-
4.1 rating from 22 votes

Friday, August 15th, 2008

ECMAScript Harmony: Brendan Eich, Douglas Crockford, Adobe, and more

Category: Interview, JavaScript

ECMAScript Harmony has been the big news of the week. It isn’t hard to see why, the next version of JavaScript is going to affect us all, for a long time (even more than a presidents term!) Alex Russell, John Resig, and myself got Brendan Eich and Arun Ranganathan on the phone to talk about Read the rest…

Posted by Dion Almaer at 10:28 am
7 Comments

++++-
4 rating from 25 votes

Custom events as API end points for key bindings and more

Category: Examples, JavaScript

Inspired by the Gmail team and how they created well known Greasemonkey endpoints and the custom events work that I have been doing, I was lead to play with custom events as a way to tie into key bindings. This lead to the following post on my blog: On the back of my example enjoying Read the rest…

Posted by Dion Almaer at 8:58 am
6 Comments

+++--
3.8 rating from 19 votes

Thursday, August 14th, 2008

YUI 3: The goals are lighter, faster, consistent, power, secure

Category: JavaScript, Yahoo!

YUI 3 has a preview release for us to check out. The goals are: lighter (less K-weight on the wire and on the page for most uses) faster (fewer http requests, less code to write and compile, more efficient code) more consistent (common naming, event signatures, and widget APIs throughout the library) more powerful (do Read the rest…

Posted by Dion Almaer at 12:14 pm
11 Comments

++++-
4 rating from 46 votes