Helping ordinary people create extraordinary websites!

Javascript Tutorials

JavaScript Tutorials are a great way to learn more coding strategies and principles of JavaScript. Below is our collection of articles and tutorials where you should be able to find the right JavaScript tutorial to suit your need. We have also included here some links to important areas of learning JavaScript to help you with your coding. Visit our JavaScript Scripts section for ready to use solutions to you website's needs and our JavaScript Blog for more great information.

» JavaScript Tutorial
New to JavaScript? Read this tutorial.
» JavaScript Functions
Learn how to create JavaScript functions.
» JavaScript Cookies
Learn how to use cookies in JavaScript
» JavaScript Syntax
Learn the syntax of the JavaScript language.
» JavaScript Variables
Learn how to use variables in JavaScript.
» JavaScript Objects
Learn how to use objects in JavaScript
JavaScript Debugging Techniques with Firebug
Apr 20th by Akash Mehta

Server side scripters have always had it easy; debugging a web application is simple, and IDEs make problems easy to identify. Client-side scripting with JavaScript, however, is a whole new ball game. In this tutorial, I'll identify the best basic and advanced JavaScript debugging techniques to help you take control of...
Striped Tables Using JavaScript
Jan 23rd by Paul McCarthy

JavaScript can be incredibly useful when you need to automate repetitive tasks. In this article we'll implement a simple JavaScript function that will apply alternate striped rows to a table. We'll implement this technique using unobtrusive JavaScript.
Opening PDFs in a New Window with JavaScript
Jan 23rd by Paul McCarthy

Opening documents such as PDFs in a new window should be automated using JavaScript for the following reasons. Users will often close the web browser when a PDF is opened, mistakenly believing the document has been opened in Adobe Reader, the attribute historically used to open a new window, target, has been removed from...
Essential Javascript -- A Javascript Tutorial
Dec 2nd by Patrick Hunlock

Javascript is an interpreted language with a C like syntax. While many people brush the language off as nothing more than a browser scripting language, it actually supports many advanced concepts such as object-oriented-programing, recursion, lambda, and closures. It's a very approachable language for the beginner that...
Submit Forms Conditionally using JavaScript
Nov 28th by SiteArticles.com

In the long-gone days of the early Internet, having a form on the website was tantamount to dabbling with "cutting-edge" technologies. Intricate Perl scripts and esoteric CGI scripts were required to process those forms and people used to suffer bouts of cold sweat whenever there manifested a need to use web forms.
How to Setup a Randomising Function
Nov 17th by Arbitrary Constant

A couple of sections on arbitrary constant used to utilise JavaScript in order to generate some random content for that pesky right column. This was done for two reasons: 1) to give the site a bit more depth and 2) to help me learn the basics of JavaScript. Now that both of these goals have been achieved, here is a guide...
Introduction to JavaScript Tutorial
Nov 9th by Neil Williams

Javascript, despite the name, is not part of the Java programming language developed by Sun. It was originally introduced with Netscape Navigator v2.0 and was designed to create dynamic online pages, such as checking details on html forms before allowing the page to submit the data.
A Simple Image/Link Rollover in Javascript
Oct 31st by Benjamin Glenn

Your web site has been up and running for some time and while you are pleased with the results, you can't help but think that it needs a little bit more "something". Maybe you want to do something with the links, like add some pictures or a "rollover effect". Well, maybe not all the links; just one or two. There's a fine...
Enumerating JavaScript Objects
Aug 22nd by Dean Edwards

The global forEach function allows us to enumerate any object according to it’s type. If the object is array-like (has a length property) then we enumerate it like an array. All other objects are enumerated using the standard for var x in y mechanism.
Javascript Diff Algorithm
Aug 22nd by John Resig

This method takes two strings and calculates the differences in each. The final result is the 'newFile' marked up with HTML (to signify both deletions from the oldFile and additions to the newFile).
Top 10 Custom JavaScript Functions Of All Time
Aug 22nd by Dustin Diaz

If there was ever a universal common.js shared among the entire develosphere, you’d fine these ten (plus one bonus) functions. It would be the swiss army knife no developer would go into production without.
Event Handlers and Callback Functions in JavaScript
Aug 19th by Sjoerd Visscher

In Higher Order Programming in Javascript I discussed the various ways of using functions as values. One particular trick in that document caught the attention of Dan Shappir, who pointed out to me: "your technique shows how JavaScript supported delegates all along, so this is not some great C#/.NET invention."
Higher Order Programming in JavaScript
Aug 18th by Sjoerd Visscher

Higher Order Programming is the ability to use functions as values. So you can pass functions as arguments to other functions and functions can be the return value of other functions. This style of programming is mostly used in functional programming, but it can also be very useful in 'regular' object oriented programming.
Dynamic External JavaScript Files
Aug 16th by Will Bontrager

JavaScript can be embedded within the source code of a web page. Or, it can be in a file somewhere else and a special JavaScript tag used to insert the file when the web page is loaded into a browser.
An Introduction to DHTML
Aug 12th by Eddie Traversa

Think of DHTML as not a singular technology but a combination of three existing technologies glued together by the Document Object Model (DOM).
Looping through form elements using JavaScript
Dec 9th by Amrit Hallan

An example of looping through all the form fields could be checking and unchecking all the check boxes present on a page (checking all the records to delete, or adding all the items to a shopping cart, for instance).
Converting to Lower Case and Upper Case in JavaScript
Oct 19th by Amrit Hallan

To convert a string to lower case and upper case in JavaScript.
Finding the Length of a String in JavaScript
Oct 19th by Amrit Hallan

When I used JavaScript to find the length of a string for the first time, I kept testing a function something like str.length(), whereas in JavaScript length is not a function, it is a property of the string object.
JavaScript Equivalent of PHP Explode Function
Oct 18th by Amrit Hallan

In PHP we can easily break a long string into smaller parts by using the explode() function of PHP. In runtime, this function works like this...
Restoring Form Field Values
Sep 26th by Will Bontrager

Once in a while we receive reports from web site owners that a visitor had to re-fill in all fields after submitting a form and then clicking the "back" button to correct information. All the fields go blank.
Things To Do With Textarea Form Fields
Sep 26th by Will Bontrager

The primary function of a textarea field is to accept input from a form user for the form processing script to do stuff with. You see their use in feedback forms, for example.
Search Engine Spider-Friendly JavaScript Content
Sep 24th by Will Bontrager

If you have syndicated content delivered with JavaScript, the content might not be indexed by the search engines.
Secret Access
Sep 24th by Will Bontrager

You go to a web page without a form or prompt indicating it might double as a secret access to another web page. You go ahead and type a certain sequence of characters on your keyboard. If you get it right, you are redirected to a secret web page.
How to Set up a Randomizing Function
Aug 16th by Richard Watts

This tutorial covers the steps involved in creating a randomizing function in Javascript.
Controlling Checkboxes with JavaScript
Jun 29th by Will Bontrager

Sometimes it's desirable to control whether or not certain checkboxes are checked, or to do something depending on which ones are checked. Although CGI scripts can do their own error checking and display messages to the form user as needed, letting JavaScript do some of the preliminary checks can be faster and less...


GET OUR NEWSLETTERS