JavaScript and AJAX Web Development Tutorials

JavaScript, jQuery and AJAX (Asynchronous JavaScript and XML) Tutorials.
  Title / Author Replies
There are hundreds of DHTML trees available online, most of them and written from scratch, some easy to understand and implement, while others are real pain to customize. Some of them need a JavaScript array to be populated or read an XML file to generate the tree. I've tried to develop one...
// The functions have been adapted from various sources // and re-written to provide maximum flexibility // and compatability with various browsers. //Global Declarations var ie = (document.all) ? true : false; function toggleClass(objClass){ // This function will toggle obj...
A look at how AJAX works This tutorial will show you how ajax works and how to use it from a web developers standpoint. Ever wonder how things like G-Talk work? they don't reload the page or use Iframes and yet they always appear to have the data thats coming in instantly. it acomplishes this...
Introduction Some characters are reserved in HTML. For example, you cannot use the greater than or less than signs within your text because the browser could mistake them for markup. If we want the browser to actually display these characters we must insert character entities in the HTML...
JavaScript is the scripting language and is used for the web. It is used webpages for validating forms,adding different functionalities , for detecting different browsers and creating cookies. One can also improve the design of web page using JavaScript. With the help of JavaScript one can work on...
XML was developed and introduced as a vehicle for data interchange, but not all developers embraced it with open arms. Some developers actually opted to develop alternatives. One such alternative is JSON ( (JavaScript Object Notation). In this article, I take a closer look at...
Programming errors are a fact of life, but pulling your hair out while tracking down these errors should not be. More robust development languages such as Java and the .NET family of languages have development environments that simplify the process of tracking down problems. JavaScript developers...
Introduction A random number generator (often abbreviated as RNG) is a computational or physical device designed to generate a sequence of numbers or symbols that lack any pattern, i.e. appear random. Computer-based systems for random number generation are widely used, but often fall short of...
Introduction The throw statement allows you to create an exception. If you use this statement together with the try...catch statement, you can control program flow and generate accurate error messages. Use the throw statement to throw an exception. When you throw an exception,...
Introduction The second type of procedure is called a function. Like a subroutine, a function also holds a series of VBScript statements. The only difference is that a function actually returns a value to the code statement that called it. A function is a block of code that can be called from...
An operator is a symbol applied to data values that causes the computer to carry out a specific operation on that data . In VBScript, operators are used to perform an operation. For example, an operator could be used to assign a value to a variable. An operator could also be used to compare two...
Many times we need to write certain parts of our script according to the browser, i.e. we need to detect the browser. Here's a snippet of how to do it. var userAgent = navigator.userAgent.toLowerCase(); var is_opera = (userAgent.indexOf('opera') != -1); var is_saf =...
Get The Most Out of AJAX AJAX is a disruptive technology that's changed the way Web apps are developed and used. It allows for interactive pages and sits on the cutting edge of current Web trends. Although the term AJAX is relatively new, the technologies behind it are not. For many years the...
Introduction Regular expressions is a form of pattern matching that you can apply on textual content. Take for example the DOS wildcards ? and * which you can use when you're searching for a file. Creating a Regular Expression You construct a regular expression in one of two ways: 1)...
Sometimes, we do not want people to copy the text on some of our web pages, here is a script which prevents user (not advanced users) from selecting the text. For better results put the JavaScript code inline and not in a separate JS file. // specify allowed tags for some browsers var...
Let us make a form based clock that displays time in the 24 hour format. We use the Date() object to get the hours, minutes, seconds of the day. setTimeoiut() evaluates an expression or calls a function after a certain amount of time, specified in milliseconds. We use setTimeout() to call the...
Continuation of Extending JavaScript Arrays. Some more functions to extend the array manipulation capabilty of JavaScript. /* Shuffles the Array elements randomly */ Array.prototype.shuffle=function() { var i=this.length,j,t; while(i--) {
Essentially, writing some code to determine the number of days in a given month of a given year with javascript is not the worlds most difficult task. It is the type of exercise that one would expect to be given as a newbie developer during a lab or lecture. The solution normally involves...
Introduction The Date class in JavaScript.This class not only makes the manipulation of dates easier (regardless of which date format you prefer) but it also handles time as well. Any time that you have a javascript that is required to do any sort of processing based on either the...
Xmlhttp is hot these, with the advent of AJAX.Xmlhttp is mainly used on the client-side to query or fetch blocks of data from the server.A typical example would be when in a sign up form the user selects the country the states for the selected country is automatically populated in the state...