Javascript

Javascript - client side magic for forms, navigation, validation and now the booming 'new technology', asynchronous javaScript + XML or AJAX (AKA remote scripting, XMLHttpRequest Object).

Quick Guide to Prototype (#)

A quick reference page for the [prototype] library to help ease the learning curve for a lot of developers out there...

Using prototype.js v1.3.1 (#)

One of the more useful links for people who are using the prototype.js library. I find that I either refer to the code, or to this page, depending on the level of caffeine in my system!

iPhoto-like image resizing using Javascript (#)

Here's a cool implementation of a slider widget used to resize images (this example uses the script.aculo.us library slider). This would be interesting for a photo uploading widget, where the user could upload a temporary file, resize to their liking, and then commit the image to that size using PHP+GD, for example.

Default Function Arguments In JavaScript (#)

A nice little tip for setting default values in Javascript. Be sure to read thru the ensuing discussion.

Script Smarter: Quality JavaScript from Scratch (#)

This article is actually an excerpt from SitePoint's new title, The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks.

Well, if it is anything like CSS: 101 essential tips, tricks and hacks, this book should be a winner for people looking for good, quick, pointed solutions to common JS necessities, and if you have hacked your way thru JavaScript this may be a worthy read to get on the right track.

This 8 page article starts from the very basics and moves into meatier things by the end, including event bubbling and event handlers among other stuff.

Please note that the links in this post are affiliate links.

JavaScript Closures for Dummies (#)

I wish this was around when I was first learning Javascript! A great article on JS closures: For some reason closures seem really hard to understand when you read about them, but when you see some examples you can click to how they work (it took me a while).

Event Delegation versus Event Handling - how to create quicker web apps (#)

An interesting solution for dealing with JavaScript events applied to a large number of elements and/or dynamically loaded elements, Event Delegation handles a click by delegating (firing) an event depending on the case.

overLIB - JS tool-tips (#)

More JavaScript widgets, this being a library of functions for various tool tip options. While not unobtrusive (consists of inline JS), either a good place to start porting or a good place for inspiration. Covered by the artistic license.

Unobtrusive and Persistant Script.aculo.us Effects (#)

There is a lot that can be accomplished with the likes of prototype and Script.aculo.us, and really, the more you read the more you get inspired, I think. Here's a post covering some unobtrusive and persistent JavaScript and it even gets into the CSS used in affected parts of the site.

Get the rendered style of an element (#)

Robert Nyman helps us to get the rendered style of a CSS element with Javascript; put another way, it allows us to use javascript to retreive the style applied to an element by an external CSS file. Be sure and read through the comments.

Raphaël JavaScript Library (#)

Raphaël JavaScript Library is not just another JS library; it creates a canvas object on which to draw, and draw it does! Check out the demos and the documentation.

Javascript in Ten Minutes (#)

A "ten minute" overview of JavaScript, particularly useful for people who already know another programming language. It has an "Example Code" section at the bottom that can be printed and used as a reference sheet.

Prototype Dissected (#)

If you are doing any work with Prototype and would like something that puts it all on one space for you, Johnathan Snook has come through with this excellent set of charts that detail every method and property that is available.

Bookmarklet Crunchinator (#)

Easy bookmarkets: enter your javascript code in the text area, click crunch and the code will be turned into a link, which can be used as a bookmarklet.

Unobtrusive Javascript (#)

An excellent, comprehensive 6 page resource that will discuss and see how we can use Javascript, but still maintain accessibility. No inline javascript here, this article focussus on the the node tree, keeping javascript separate and just doing things right.

Closures and executing JavaScript on page load (#)

Simon Willison gives a short explanation about closures in Javascript, and outlines a nice example of how this can be used for executing multiple onload functions using his addLoadEvent() function. Very cool.

SourceForge.net: Project Info - Sarissa (#)

From the project page: Sarissa is a cross-browser ECMAScript library for client side XML manipulation, including loading XML from URLs or strings, performing XSLT transformations, XPath queries and more. Supported: Gecko (Mozilla, Firefox etc), IE, KHTML (Konqueror, Safari).

domCollapse (#)

An interesting unobtrusive implementation of the common JavaScript expand/collapse function. The twist?

To identify a trigger element, you add the class "trigger" to it as an attribute. This will automatically collapse the next following element in the document tree.

Efficient JavaScript code (#)

Well written code will help to minimise the performance impact of User JavaScripts. With that statement, this article gets into speeding up loops, referencing elements, string matching and talks about eval, among other things. Deals with some common principles that many will have seen before, but it's worth a read.

Check out the Resource categories for older content

The latest from my personal website,
Mike Papageorge.com

SiteUptime Web Site Monitoring Service

Sitepoint's web devlopment books have helped me out on many occasions both for finding a quick solution to a problem but also to level out my knowlegde in weaker areas (JavaScript, I'm looking at you!). I am recommending the following titles from my bookshelf:

The Principles Of Successful Freelancing

I started freelancing by diving in head first and getting on with it. Many years and a lot of experience later I was still able to take away some gems from this book, and there are plenty I wish I had thought of beforehand. If you are new to freelancing and have a lot of questions (or maybe don't know what questions to ask!) do yourself a favor and at least check out the sample chapters.

The Art & Science Of JavaScript

The author line-up for this book says it all. 7 excellent developers show you how to get your JavaScript coding up to speed with 7 chapters of great theory, code and examples. Metaprogramming with JavaScript (chapter 5 from Dan Webb) really helped me iron out some things I was missing about JavaScript. That said each chapter really helped me to develop my JavaScript skills beyond simple Ajax calls and html insertion with libs like JQuery.

The PHP Anthology: 101 Essential Tips, Tricks & Hacks

Like the other books listed here, this provides a great reference for the PHP developer looking to have the right answers from the right people at their fingertips. I tend to pull this off the shelf when I need to delve into new territory and usually find a workable solution to keep development moving. This only needs to happen once and you recoup the price of the book in time saved from having to develop the solution or find the right pattern for getting the job done..