Archive for February, 2010

File Under: Ajax

Ajax for Beginners

JavaScript has had the XMLHttpRequest object for almost a decade now, but it really only started getting wide attention in 2004. All this attention was mostly due to some showoff web applications that made every developer who saw them think, “I want my site to do that!” But it also has to do with the spiffy, spiffy name given to it by the folks at AdaptivePath, who named this asynchronized application Ajax. Maybe you’ve heard of it?

A few high-profile Google applications in particular made a splash with Ajax: Maps and Gmail were first. It also powers some of the core functionality in the user interface of the ever-so-popular photo sharing site Flickr. By now, Ajax has become integral to the fabric of the web, especially in the era of real-time applications like Twitter, Buzz and Wave (all of which use Ajax extensively in their webapp front ends, for the record). Ajax may also lay claim to being the first JavaScript object with its own fan website. Date.com doesn’t count, although I did have a scintillating chat with a lady there once about the getTimeZoneoffset method.

Continue Reading “Ajax for Beginners” »
File Under: HTML5, Web Standards

No Virginia, Adobe Isn’t Blocking HTML5

Ian Hickson, head of one of the standards groups charged with creating HTML5, caused quite a stir over the weekend when he alleged that Adobe was trying to block HTML5. Adobe quickly denied the charge, but not quickly enough for the open web evangelists to grab their pitchforks and take to blogs in anger. After all, it was a juicy turn of events — big company with a vested interest in its own tech (Flash, in this case) tries to block a competing technology on the free, open web. It all ended up sounding like some conspiratorial, back-room maneuvering worthy of an Oliver Stone film. The truth is considerably more complex and, dare we say, kind of embarrassing. In fact, dig a bit into the internal workings, back-stabbing, petty snipping and politics of both the W3C and the WHAT WG, and you’ll quickly come to realize it’s nothing short of a miracle that HTML5 exists in any form at all. This particular tempest in a teacup revolves around an e-mail from Larry Masinter, Principal Scientist at Adobe, questioning whether the Canvas 2D element, the RDFa specification and the Microdata spec were within the scope of the WHAT WG’s charter. The answer to that is hashed out in some detail on the WHAT WG’s public mailing list. The short version seems to be that no, they probably aren’t, but WHAT WG decided to include them in the spec anyway. As far as we can tell, no formal objection was ever lodged. Though it certainly sounds like Masinter is planning to file one when he writes:
If I need to use the word “formally” in there somewhere, or if there’s some “Formal Appeal Change Proposal” form I’m supposed to fill in, recapitulating all of the e-mail arguments made to date, suggesting the documents “change” by disappearing, and written in iambic hexameter, please let me know.
However, Masinter has since said that neither he nor Adobe has filed or intends to file any formal objections. Perhaps more importantly, even if Masinter were to do so, it’s hard to see how that would “block” HTML5. Masinter (and some others) merely object to HTML5, Canvas 2D and other specs all being lumped together, not to the specs themselves. So how will all this hoopla impact HTML5 and the web that we mortals actually use? The answer is, it won’t. Regardless of what the W3C ends up doing with the Canvas 2D spec and other sub-elements of HTML5, browsers are already supporting them. Certainly it would be good if these elements became an official part of the HTML5 spec, but whether or not they do will have very little impact on the web as we know it. After all the HTML5 spec won’t officially be finished until 2012, but HTML5 is already changing the web since all browsers but IE are supporting it. The reality is that, for all their blustering and antics, neither the W3C nor the WHAT WG ultimately have much practical impact on HTML5′s adoption on web. For that, we rely on browsers and the various HTML5 elements they chose to support. See Also:
File Under: HTML

Use Transparent PNGs in IE6

What? One of your visitors is running IE6? For reals?

That upends a whole bucket of problems on your end, one of which is that your IE6 visitor can’t parse the transparency layers of the PNGs you’ve used to build your site navigation. The horror!

Fear not, hope lies within…


Continue Reading “Use Transparent PNGs in IE6″ »
File Under: JavaScript, Programming

YUI Carousel

This is an example file used in our YUI JavaScript Library tutorial. It produces a window with rotating content, as seen on Yahoo.com’s current frontdoor.

Continue Reading “YUI Carousel” »
File Under: Frameworks, JavaScript

Dojo Template

Want to get started with the Dojo JavaScript Toolkit? Here’s the place to start. This is the blank drawing board for working with Dojo web applications.

The template was written for and used as the blank slate template for our Get Started With Dojo tutorial. Continue Reading “Dojo Template” »

File Under: JavaScript

Dojo Button and Alert Dialog

Want to get started with the Dojo JavaScript Toolkit? Here’s the place to start. This code uses Dojo to skin and create specialized Document Object Model (DOM) elements.

The template was written for and used as the blank slate for our Get Started With Dojo tutorial. Continue Reading “Dojo Button and Alert Dialog” »

File Under: JavaScript

YUI Calendar

This example code is part of our YUI JavaScript tutorial. It creates a calendar that you can add events to.

Follow along with the tutorial to learn how to use it.

Continue Reading “YUI Calendar” »
File Under: JavaScript

Sanitize Text with MooTools

The code, and the template, are referred to in Webmonkey’s Get Started With MooTools reference page. In this example, the HTML page contains several forms. Using JavaScript and the MooTools web framework, we will pull out the last letter of a typed form, clean up unused space in another form and automatically format a telephone number.

Continue Reading “Sanitize Text with MooTools” »
File Under: JavaScript

John Resigs addEvent Template

This template was written by John Resig. The original can be found at John Resig’s addEvent function website.

Webmonkey is using it for its JavaScript Events reference page.

Continue Reading “John Resigs addEvent Template” »
File Under: JavaScript

Create Rich Interfaces With the YUI Library

The line between web and desktop applications is fading. Users now expect a richer experience. JavaScript can help provide interfaces and interactions that mimic the desktop. In this tutorial, I’ll introduce you to the JavaScript-based Yahoo User Interface Library. We’ll use it to convert normal HTML into more interactive controls.

Best of all, Yahoo’s library is open-source and has been released under a BSD license, so it’s free for all users.

Continue Reading “Create Rich Interfaces With the YUI Library” »