JavaScript and Ajax Tips & Tutorials | 2 | WebReference

JavaScript and Ajax Tips & Tutorials | 2

JavaScript is an easy-to-use programming language that is common on Web pages. It can enhance the dynamics and interactive features of your site with small amounts of code.

Ajax (Asynchronous JavaScript and XML), is a group of inter-related Web development techniques (including JavaScript, PHP, among others) used for creating interactive Web applications.

Dojo.behavior: Write Modularized HTML Document Event Handling
The dojo.behavior module provides a simple and lightweight mechanism for listening to HTML document events. Find out what makes dojo.behavior one of the best event handling mechanisms around.
The Dojo Publish/Subscribe Event Mechanism
Learn how to use the Dojo Toolkit's versatile ContentPane widget to load dynamic content into your Web pages.
Post a Message on a Facebook Wall with JavaScript
Allowing your visitors to easily post links to your website on Facebook can really boost traffic.
Loading Dynamic HTML Content Using the Dijit ContentPane
Load dynamic content into your Web pages using the Dojo Toolkit's versatile ContentPane widget.
Event Listening Made Easy with Dojo.connect
The Dojo libraries offer programmers a single coherent event system. With dojo.connect, you can execute any number of functions in response to DOM and widget events.
Using with the jQuery Globalization Plugin in ASP.NET
The jQuery Globalization Plugin provides globalization support to ASP.NET applications that can use JavaScript.
Squeezing the Most Out of the Ajax Control Toolkit's Accordion Tool
The Accordion Control is one of the many useful controls that comprise the Ajax Control Toolkit.
Create Keyboard Shortcuts for Web Apps with JavaScript
For a long time, Web apps were not considered an viable alternative to desktop apps, and one of the primary reasons was the lack of keyboard shortcuts. You can change that using JavaScript.
Enhancing the Chained Select Widget with Dojo FilteringSelects
Since the emergence of JSON, object literals, and JavaScript frameworks like Dojo, setting up chained select boxes does not have to be an ordeal.
The qooxdoo Virtual List Widget's Most Impressive Features
One of the most exciting additions to the qooxdoo 1.3 JavaScript framework is the new Virtual List widget. Get a sampling of the Virtual List's most impressive features.
Working with DataGrids in jQuery
Using jQuery and the jqGrid plugin, you can bind data to data grids in Visual Studio -- for both ASP.NET MVC and WCF.
Create Chained Select Boxes with the Dojo Libraries
The emergence of JavaScript frameworks has simplified the development of chained select boxes. See exactly how with a Dojo framework case study.
Programmatic Widget Creation in Dojo
Dojo makes it easy to create your own reusable controls programmatically, allowing you more creative control over your Dojo widgets.
Using the Dojo Framework to Build Custom HTML Widgets
The Dojo Framework can be extended to write your own widgets, going beyond the pre-defined widget designs of Dojo's out-of-the-box Dijit and Dojox controls.
Uploadify: The jQuery Plugin for Customizing File Upload Fields
Uploadify, an excellent Flash plugin for jQuery, allows you to customize the functionality and appearance of file upload fields.
An Introduction to Event Handling in jQuery
Leverage the power of the jQuery Event API to handle events for your DOM elements.
Localizing Declaratively Created Dojo Widgets
Use a "before widgetizing" Dojo technique to localize a Web form. On form submission, you can validate the form and present a localized dijit.Dialog to the user.
Building a Style Sheet Switcher with JavaScript
Because JavaScript is a client-side scripting language, it is ideally suited to the task of building a style sheet switcher.
A Localization Primer for Dojo Dijit and Dojox Controls
Get an overview of the requirements and general considerations for localizing a Web form using Dojo's Dijit and Dojox widgets.
10 jQuery Tips and Tricks for Visual Studio
These 10 techniques will help Visual Studio users make better use of the jQuery JavaScript library.
Take Your Web Forms to the Next Level with Dojo
Dojo's claim to fame is its collection of rich UI controls. If you can write HTML and CSS, Dojo allows you to quickly build reusable client-side components.
Dojo i18n: a Pure JavaScript Localization Solution
For those of you who require localization services for small to medium applications, this article presents Dojo's pure JavaScript i18n module.
Build a Context Menu with jQuery and CSS
Bring desktop app functionality to your Web apps by using jQuery and CSS to implement context menus for your users.
Building an Ajax-driven File Uploader
Try a file-upload solution that uses Ajax to provide continuous feedback to the user as the file is being uploaded to the server.
Combine Ajax and JSON to Transmit Complex Presentation Data
Learn how to combine Ajax and JSON to override the browser's default locale and perform retrievals of complex data.
JavaScript's Lack of i18n Support and What It Means for You
Despite its atrocious lack of i18n functionality, you can make JavaScript work better with multilingual web pages.
Log JavaScript Errors Using an AJAX-driven Web Service
JavaScript's error-capturing mechanisms not advanced enough for your web applications? Here's a novel way to log JavaScript errors using an AJAX-driven web service.
Working with the Ajax Control Toolkit
The Ajax Control Toolkit is a community project from Microsoft that contains a number of controls to design and implement Ajax-enabled controls seamlessly. In this article, Joydip Kanjilal shows you how to start working with the Ajax Control Toolkit and explores two sample extender controls.
Mixing Scripting Languages
Today's article will highlight some of the ramifications of mixing scripting languages in your web pages. These discussions will be applicable to cross-browser scripting and HTAs as well.
Data Persistence in Jaxer
In this last article in a three-part series on Aptana Jaxer's server-side JavaScript Application Framework, we'll be looking at data persistence in Jaxer as we create a session variable for our blog application and move to storing the posts in a proper database.
Create a File-based Blog using Jaxer
In the "Your First Server-side JavaScript Application" article, we learned how to write server-side javascript for the Jaxer plugin by building a simple file-based blog in Aptana Studio. Today, we'll extend the project to include the ability to add posts and save them to a file on the server.
Your First Server-side JavaScript Application
Aptana Jaxer is a JavaScript server plug-in that enables database/file system access, network communications, and user sessions. Today, we will be using the Aptana Studio IDE to build a simple file-based blog for Jaxer.
Modal Windows on the Web
Web design has come a long way from just creating HTML documents. It is essentially the art of presenting information in a readable, useable and functional manner. Numerous interface elements can be used to achieve the goal, including tabbed layouts, paginated view and modal windows. This article examines the different uses of modal windows.
JavaScript 2.0: A Sneak Preview
The JavaScript 2.0 / EMCAScript 4.0 proposal isn't due to be finalized until the end of the fall of 2009, but it's already garnering lots of strong reactions - both good and bad. Today, we'll be taking a look at some of the proposed specifications and you can decide for yourself whether they constitute improvements in the language or merely unnecessary standardization.
Create Web applications with your own tailor made UI
Learn how to create a Visual WebGui application and completely customize the look and feel of it using the Visual WebGui Control & Theme Designers.
Introduction to Server-side JavaScript
Although rich web sites and applications have become the norm in recent years, they can still be difficult to develop, maintain, and expand. Many of the challenges stem from the schism between client and server components. The Jaxer server, developed by Aptana, is an open source Ajax web server for building rich web pages and applications in JavaScript. Writing code for Jaxer is the focus of this article.
The Lightest Lightbox
The last installment of this series discusses the lightest implementation of Lightbox. While it is stripped of all the bells and whistles, you are free to add them if you like. It requires no JavaScript framework, only a few lines of JavaScript to open and close the Lightbox.
Understanding JavaScript Closures
Closures are the answer to the problem of how to bind variables to functions that are called at a later time. Today's article will explain what closures are, outline some common dilemmas, and present ways that closures can be utilized to overcome them.
Testing your DTD XML Schema Validation
A key ingredient of successful testing is the separation of the component that you are testing from the rest of the process or application. This article explains how to perform your DTD XML schema testing outside of the application that runs it.
Thickbox 3.1
Continuing our series on various implementations of Lightbox, this article discusses another library, namely Thickbox, which can be used to display modal dialog boxes.
Debugging JavaScript: Beyond Alerts
Today, JavaScript can be written, debugged, and even tested using frameworks' built-in functionality or by specialized software. In today's article, we'll begin examining some of the latest ways of debugging your JavaScript code.
Greybox, Lightbox Part 2
Greybox offers another use of Lightbox that other implementations can't brag about. Learn how to display a website or web page in a div, using Greybox.
Debugging JavaScript: Handling Runtime Exceptions
The Error object provides a number of properties to help you display more meaningful error messages to the client and more useful debugging information to you, the developer. In this article, we'll go over how to use the Error object to handle runtime exceptions.
Debugging JavaScript: Understanding JavaScript Error Messages
One of the most pervasive criticisms about JavaScript is that it's painfully difficult to debug. The good news is that you don't have to be intimidated or turned off by JavaScript. In this article, we will be taking a look at the types of errors that you are likely to encounter in JavaScript development and how to minimize the chance of them cropping up in your code.
Shedding Some Light on Lightbox
The first in a new series, this article discusses how to display large images on your website, on demand, without increasing load time.
Comet Programming: the Hidden IFrame Technique
In the 'Comet Programming: Using Ajax to Simulate Server Push' article, we learned how to use XMLHttpRequest long polling to refresh page components and keep cached data in synch with the server. Today's technique, sometimes called a 'Forever Frame', relies on a hidden IFrame.
On-Demand JavaScript Explained
As JavaScript Frameworks and user JS libraries become increasingly commonplace, download times can become a real turn off to users. There are times where dynamically loading scripts and other resources can be of great benefit. In this overview of on-demand JavaScipt, we'll go over the basics of how it's done, as well as look at some tools that allow you to take advantage of On-Demand JavaScript right away.
Prototypal Inheritance Explained
Newcomers to JavaScript often misunderstand its object oriented style. This short tutorial explains how JavaScript implements object inheritance and how you can use it to your advantage.
Comet Programming: Using Ajax to Simulate Server Push
Comet is a Web application model that enables Web servers to send data to the client without having to explicitly request it. This article will examine one method of implementing Comet called Ajax Long Polling and demonstrate how it can be used to create event-driven Web apps.
Form Validation using jQuery
There are as many ways to implement form validation as there are opinions of the best way to do it. This article discusses client-side validation using jQuery's validation plugin. That is, we will use JavaScript to validate the fields before submitting the form to the server.
Building a Client-Side Ajax Cache: Caching Algorithms
Relying on the browser's cache to store Ajax data has distinct limitations. A better solution may be to create your own cache management class. In this installment we'll be covering some caching mechanisms, as we build upon our cache management class.
Introducing the ASP.NET Ajax Frameworks
Ajax is a popular technology that is used in many different ways on the World Wide Web. It has become a technology of choice for building fast and responsive user interfaces. This article takes a brief look at the features of some of the more widely used ASP.NET Ajax frameworks.
Building a Client-Side Ajax Cache
As we create dynamic content on the Web, we should consider the issue of whether or not to cache some of our data, just like other page content. In this two part series, we'll build a client-side cache management system using the Prototype JavaScript Framework.
Using Dojo for Client-Side Validation
Client-side form validation is quick and reduces the load on the server. This tutorial explains how to use the Dojo JavaScript library for these types of validation in order to enhance your form processing.
Functional JavaScript
In this article, we explore the Function object and learn about its role in a lesser known style of coding called Functional Programming. We focus on the Functional Programming concept of using Higher Order functions to improve code modularity.
How to Use the 'AddThis' Social Bookmarking Service
Social Bookmarking has become an important way of driving traffic to your site. You can choose from a variety of scripts, but you'll soon run into maintenance issues. There's an easier way, an all-in-one script, by AddThis.
Overview of Popular JavaScript Frameworks - ASP.NET AJAX
In this last installment of the JavaScript frameworks overview series, we'll be highlighting the main features of Microsoft's ASP.NET AJAX Framework, including controls, JavaScript Type extensions, asynchronous communications, and debugging capabilities.

Archived JavaScript and Ajax Tips & Tutorials

Specs and Documentation

Core JavaScript Reference: Version 1.5
This book (in HTML format) is a reference manual for the core JavaScript language, version 1.5. Can be used in conjunction with the Core JavaScript Guide, listed below. Written by the developers at Netscape Communications. An excellent resource.
Core JavaScript Guide: Version 1.5
Starting at the beginning, this reference explains everything you need to know about using core JavaScript. This reference assumes you have the following basic background: a general understanding of the Internet and the World Wide Web and a good working knowledge of HTML. Written by the developers at Netscape Communications. An excellent resource.
JScript Documentation
Technical information and tutorials. From Microsoft.
ECMAScript Language Specification
A PDF version of the official specification for ECMAScript, the vendor-neutral standard for what was originally Netscape's JavaScript

JavaScript Book Excerpts

Here is our complete library of book excerpts covering JavaScript and Ajax.

Archived Doc JavaScript Columns

The Doc JavaScript Archive - These JavaScript articles were written by the Doc JavaScript team (Yehuda Shiran and Tomer Shiran) between 1997 and 2002.

Other Tutorials [Off Site]

Beginning JavaScript Tutorials
Tutorials designed so that even beginners can begin using javascripts on a web page.
JavaScript for the Total Non-Programmer
A good introductory tutorial for beginners. This site walks you throught the basics of Javascript.
JavaScript Tutorial for Programmers
A JavaScript tutorial aimed primarily at those with some prior programming experience. Focuses on illustrating the syntax and methodology of JavaScript.

Collections's JavaScript
Weekly how-tos and resources from
All About JavaScript
Canned scripts, tips and tricks, and links to JS info around the world. From, another part of the family of sites.
All about Web development and programming. Rather than simple "cut and paste" listings, you'll find detailed articles on client and server side coding. Supports W3C standards. By Mike Hall.
Danny Goodman's JavaScript Pages
Examples of JavaScript implementation available for downloading in addition to the JavaScript mini-FAQ. Goodman is a noted author and scripter.
Dynamic Drive
Free DHTML sripts and components for your Web site. Frequently updated.
Google's JavaScript Resources
JavaScript references and listings from DMOZ/Google.
This WebReference affiliated site is your gateway to all things JavaScript. Featuring javascript tutorials, free java scripts, tools, and links.
A database with free JavaScripts, discussion groups and news.
JavaScript and CSS DevCenter
O'Reilly Net's JavaScript portal, includes JavaScript news feed.
JavaScript Source
An excellent JavaScript resource with lots of free cut & paste JavaScript examples with source code included.
JavaScript Kit
Tutorials, code, and discussion. Constantly updated for new material and revisions.