| TOTAL: 17 Page: 1 of 1 |
|
setTimeout() - How to use the "setTimeout()" function
setTimeout()" is used to start a timer that calls a function after a certain delay that is specified as a second parameter. "setTimeout()" accepts 3 parameters. The first parameter is a function reference, while the second parameter is the time in milliseconds in which the browser waits before it calls the function. The third parameter is hardly ever used, mainly because each use isn't crossbrowser. For Internet Explorer you can specify the language (VBScript for example), and in some other b

| Hits: | 126 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
More On Objects - A tutorial covering all sorts of things about objects
JavaScript allows for several ways to declare objects. One way is as a hashtable, which can be very odd. The way to do this is very simple: The main thing to notice is that there is a comma after each property/method besides the last one, much like an array. There really isn't much more than that.

| Hits: | 93 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Object Inheritance - Learn to use object inheritance
By now you should have read my tutorial on javascript objects and be able to create and manipulate objects. This is not that complicated if you already understand javascript objects and should be very easy to learn. The Reasoning: As objects shorten code, so does inheritance. Inheritance allows multiple objects to share properties/methods of a parent object. In a way javascript objects can have multiple parents, but not in the traditional sense. That is they do not officially have 2 or more

| Hits: | 89 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Objects - Learn to use objects to speed up the execution of your script
Welcome to the javascript objects. By now you should already have a firm grasp over javascript basics. Which you might be wondering what the heck they are. An object is the to me the equivalent of an OOP class. I'm sure you've heard of and used several objects before, most likely without even realizing it. Perhaps they will ring a bell: * String * Array * Date * Number I'll go over how to modify the existing ones and how to create your own.

| Hits: | 97 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Introduction to functions - Basic introduction to functions
A function is a bit of code that can be used once or many times, and is made of statements to perform tasks. Each function you create in your script needs to have a unique name so that they can be called in your script. Below is a simple example of a function.

| Hits: | 113 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
The prototype object of JavaScript
No, we're not going to discuss how to construct a new version of JavaScript in this tutorial. The prototype object of JavaScript, introduced starting in JavaScript 1.1, is a prebuilt object that simplifies the process of adding custom properties/ methods to all instances of an object. I know, I'm starting to sound a little geeky already, but hay, JavaScript isn't just about fun and games...it's important to learn the serious side of it too.

| Hits: | 52 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Creating custom objects in JavaScript
All JavaScript coders eventually reach a stage where they would like to create and use their own objects, apart from the pre-built ones, such as document or Math. Custom objects allow you to build up your own personal JavaScript "toolbox" that extends beyond what the pre-build objects have to offer. After reading this tutorial, you'll learn how to create your very own JavaScript object, complete with custom properties and methods!.

| Hits: | 63 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Flag Variables, Validation, & Function Control
This tutorial is written and contributed by Alex Vincent. Edited by JavaScript Kit. Alex is a long time visitor of JavaScript Kit, and participant of CodingForums. Have you ever had to validate a form in JavaScript? If you've built forms in HTML, you probably know by now you can never be certain what your clients will put in those forms. Sure, you can tell them what they are supposed to put in a form, but if your directions are not followed, you may receive bad results from the form. Valid

| Hits: | 55 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Avoiding variable and function conflicts in JavaScript
One of the concerns I have about writing scripts and tutorials for other people to use is that invariably, my scripts create new functions, variables, etc., each with names which no one else using my script can use for their own projects. The same hazard applies to any script you can cut & paste. In this tutorial, I'm going to offer a few ideas you can use to make sure you don't add too many common object names to your scripts. Choosing unique object names Obvious names for any object sh

| Hits: | 72 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Variable and expression shortcuts
While this tutorial may not be as "flashy" as "Creating a window remote control" or "I'll have a double combo please", it can be just as interesting and useful, for the JavaScript geek, that is (just kidding). In this tutorial, I'll discuss a few simple shortcut techniques the average JavaScripter can use when it comes to declaring variables or coding certain JavaScript expressions. Wake up!

| Hits: | 72 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Variable and expression shortcuts
While this tutorial may not be as "flashy" as "Creating a window remote control" or "I'll have a double combo please", it can be just as interesting and useful, for the JavaScript geek, that is (just kidding). In this tutorial, I'll discuss a few simple shortcut techniques the average JavaScripter can use when it comes to declaring variables or coding certain JavaScript expressions. Wake up!

| Hits: | 43 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Using named arguments in JavaScript functions
Normally, a JavaScript function takes an list of arguments, with the order of each argument predetermined. As an example, the parseInt() function takes two arguments, a string representing a number, and the radix of that number. You need to specify those in exactly that order, first a string, then the number, or at the very least, just the first argument. However, ponder a function where you wish to specify only the second argument, or both of them in arbitrary order - the deficiency of the Java

| Hits: | 60 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Creating Robust Functions
Before we continue, its best to first describe what we consider to be a robust function. A robust function, in our view, is one that can accept any number of parameters, as opposed to a "normal" function, where the number of parameters accepted is preset, and cannot be altered. Lets get started, shall we?

| Hits: | 58 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Determining the existence of a variable
As we learn about JavaScript, a question almost invariably comes up along the way: "Is there a way to determine whether a particular variable exists or not in a script?" In other words, can I ask JavaScript whether, say, "x", is defined in a script, and do something different, depending on the result? You may think the solution looks something like this:

| Hits: | 57 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
The Math object
Programmers are often typecast as good mathematicians. While this is in fact the case with me, I doubt it applies to everyone (small joke). As the scene erupts in a sea of fury, lets just settle on the fact that every mathematician needs a calculator sometimes, or in the case of JavaScript, the Math object. Want to calculate "2.5 to the power of 8" or "Sin0.9" in your script? JavaScript's virtual calculator is what you need. Below lists all of Math's object's properties and methods:

| Hits: | 55 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Objects and Properties
Now that we know how to do stuff, we need a canvas onto which to mess about. Here we'll take a closer look on the DOM, and learn how to get control of all the objects on our pages. The Document Object Model was introduced in basic JavaScript, but we're going to get more in-depth with it this time. To recap briefly, the DOM is a description of how the objects that make up a page are connected together to form a whole. Using it, we can gain access to each object's properties and methods and cha

| Hits: | 105 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Functions
Functions are the methods you set up yourself to do work for you. Whatever you need achieved through JavaScript, you can write a function for it. Functions save lots of time, as their output depends on the inputs you give them. So one function can be used to perform a number of tasks. Now that we know about event handlers, variables, and statements, it is time to bring all our knowledge together — to create functions. Functions are the workhorses of JavaScript. A basic function looks like t

| Hits: | 85 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |