Tutorials - Page 2 | JavaScriptSource

Tutorials - Page 2

Are you new to JavaScript, or trying to learn advanced techniques? These tutorials will show you step by step how to create and add JavaScript code to any Web page. There are also many advanced tutorials to enhance your understanding of the language. For Ajax instructions, see our Ajax tutorial section.

  • How to Create Remote AJax Requests
    Kris Hadlock Mar 18, 2008

    One of the most common questions about Ajax is whether it's possible to create remote or cross-domain Ajax requests. The answer is yes and in this tutorial you'll learn how to create an Ajax-enabled podcast aggregator with PHP and Ajax.

  • Using Multiple JavaScript Onload Functions
    Lee Underwood Mar 18, 2008

    When using multiple scripts, often they are executed using onload event handlers. This can sometimes be a bit tricky if more than more is used. Check out this easy, fool-proof method for use with your scripts.

  • A Practical Guide to Numbers in JavaScript
    Greg Burghardt Nov 30, 2007

    Dealing with numbers, strings and JavaScript can be frustrating for a beginner. This is a down-and-dirty explanation of converting strings to numbers, detecting if a string is a number, and handy functions for manipulating numbers.

  • Are You Ready for This?
    Patrick Hunlock Nov 30, 2007

    This tutorial takes you through a page's ready states and shows how to write JavaScript code to determine when a page's DOM elements are loaded and available.

  • Calling an ActionScript Function from JavaScript
    Aral Balkan Oct 24, 2007

    This tutorial will show you how to use the FlashProxy JavaScript class to proxy function calls between Flash and JavaScript.

  • Cookie Monsters Inc
    Patrick Hunlock Oct 24, 2007

    One of the most powerful tools available to the Web developer are HTTP cookies. Here's the 411 on how cookies work, complete with public domain JavaScript functions.

  • Developing a Simple Validation Library in JavaScript
    Jagadish Chaterjee Oct 24, 2007

    This tutorial teaches some of the most commonly used JavaScript functions for client side validation of HTML forms. You can reuse these scripts to inject into server side controls.

  • Introduction to the Document Object Model
    Mike Hall Oct 24, 2007

    The Document Object Model, or DOM, is the interface that allows you to programmatically access and manipulate the contents of a Web page. This tutorial is a discussion on the DOM representation of a document and the methods it provides to access those objects.

  • Using Prototype to Load Javascript Files
    David Kees Oct 24, 2007

    This tutorial shows the implementation of the general technique of loading functionality via scripts based on the availability of DOM elements.

  • A Personalized "Thank You" Pages
    Will Bontrager Oct 17, 2007

    This tutorial will show how to create a personalized "thank you" page for all of your forms. The method described here is accomplished with JavaScript and cookies.

  • Browser Detecting (and What to Do Instead)
    Richard Cornford Oct 17, 2007

    Browser detection has proven unreliable. An alternative strategy is known as object or feature detection. This tutorial examines why browser detection does not work, and looks at how to implement feature detection.

  • Effectively Requiring Cookies With All Browsers
    Will Bontrager Oct 17, 2007

    If you have any Web pages that must not be viewed unless a certain cookie is set, this article contains the means to make it so. The article sidesteps the argument that restricted content can be viewed simply by turning off JavaScript. It will show you how to redirect browsers to a different page if they don't have JavaScript turned on.

  • JavaScript, DOM, and the Humble Form
    Greg Burghardt Oct 17, 2007

    So you've got a form on your Web page, and now you want JavaScript to interact with it. This tutorial outlines the various methods used when scripting forms, and explains the Form Document Object Model in detail. Includes code examples of the two main methods with an emphasis on Web standards and best practices.

  • Loading Two or More Frames Simultaneously
    Will Bontrager Oct 17, 2007

    When you have a framed site and want to load content into two or more frames when only one link is clicked, JavaScript can be used to accomplish it.

  • Understanding the JavaScript RegExp Object
    Harish Kamath Oct 17, 2007

    Need to match and replace patterns on a Web page? JavaScript can do the job quite well. This tutorial will teach you how, with an introduction to the JavaScript RegExp object and its methods.

  • Attributes > Classes: Custom DOM Attributes for Fun and Profit
    Pete Forde Mar 20, 2007

    XHTML gives the ability to extend markup with customized, semantically meaningful attributes. The battle between classes and attributes might be a holy war to some and unknown to most others. To clear things up, this article gives several examples and provides functions for working with your own custom attributes.

  • String Concatenation and String Operators
    Jennifer Madden Mar 20, 2007

    Concatenation is the process of combining two or more separate strings together to form one string. You can also use string operators to break up a long string into multiple strings to make your source code more readable. This tutorial explains how to use both procedures.

  • The JavaScript Array: Definition and Syntax
    Jennifer Madden Mar 20, 2007

    A JavaScript array is a beautiful thing. It is a little database holding any given type of information, and is easily accessible to you and your scripts. To understand each part of an array, this tutorial examines custom arrays and DOM arrays.

  • The Perfect Pop-Up
    Ian Lloyd Mar 20, 2007

    If you believe the likes of Jakob Neilsen and his supporters, nothing is more evil than pop-up windows. And in many ways, this is correct. Why? Well, we'll list the reasons soon enough, but in a nutshell it's because they are nearly always poorly implemented or simply not needed. This tutorial will show that, with the right thought, pop-up windows can be used without upsetting anyone - particularly the person browsing your site.

  • A Personalized "Thank You" Page With Any Form
    Will Bontrager Jan 25, 2007

    This tutorial will show how to create a personalized "thank you" page for all of your forms. The method described here is accomplished with JavaScript and cookies.

  • Using JavaScript To Call PHP Database Routines Between Windows
    Jan 25, 2007

    This tutorial shows how to create a select or dropdown list for use with database routines. Learn how to gather input in one window for processing in another window. (01/25/2007)

  • JavaScript Cheat Sheet
    Dave Child Jun 15, 2006

    The JavaScript cheat sheet is designed to act as a reminder and reference sheet, listing methods and functions of JavaScript. It includes reference material for regular expressions in JavaScript, as well as a short guide to the XMLHttpRequest object.

  • Creating an Autosuggest Textbox with JavaScript: Part 2
    Nicholas Zakas Jun 6, 2005

    In the first part of this series, you learned how to create type ahead functionality in a textbox, which presents the user with a single suggestion for what they've already typed. This article builds upon that functionality by adding a dropdown list of multiple suggestions.

  • Creating an Autosuggest Textbox with JavaScript: Part 3
    Nicholas Zakas Jun 6, 2005

    In the second part of this series, you learned how to add a dropdown suggestion list to the autosuggest control. This week you'll learn how to complete the modifications, make your suggestions case insensitive and get the suggestions back from the server instead of using client-side information.

  • The JavaScript Diaries
    Lee Underwood Apr 18, 2005

    JavaScript is a versatile language which can enhance your Web site. This is an ongoing series on the process of learning JavaScript, starting from the very beginning.