| TOTAL: 84 Page: 1 of 5 |
|
Check TextArea Length
If you are setting up a form on your website you might want to limit the length of the text that your users can type in a textarea so they can't send you a poem for you to read. HTML doesn't offer such a feature, but we can use javascript to check the text length and in case trim it. The user will also be shown the number of remaining chars. We need to write a function that, each time that the user types a char, counts the number of chars and removes those exceeding the limit. We'll use this

| Hits: | 62 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Tag Showing / Hiding - Learn to hide or show defined tags upon a link click
So you've moved on to dynamic menus or content and showing / hiding certain content on demand would be a great addition right!? Well you'll be glad to know this is a very simple script to create. Lets first start with the html divs and links:

| Hits: | 92 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Using External JavaScript - How to link to external javascript files
In this tutorial you'll learn how to include external JavaScript in your websites and understand the advantages of doing this. External in this context means 'outside your web page'. Instead of including all that long messy JavaScript in your actual index.html you can use one line of code that will tell the users browser to load JavaScript from the file you specify. Benefits - faster loading times - organization Linking to an external JavaScript is a good practice to make use of simpl

| Hits: | 84 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Custom Objects - A tutorial covering custom objects, properties, operations
This tutorial is intended for intermediate to advanced JavaScripters. We've seen plenty of objects in our JavaScripting careers. Math, Number, String, Array, etc. These objects also had their own properties and methods (ex: Array.length and Math.round()). The object's properties are simply it's characteristics while it's methods are simply the operations it can perform. Let's take a proboarder for example. Each PBer has their own properties (posts, age, username, date registered, etc). They als

| Hits: | 86 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Recursion - Learn how to use recursion to better your programming
What is Recursion? Recursion is an alternate method of performing something instead of iteratively. Iteration is the standard method of looping with something like while, or for, I'm sure that all of you know the drill. What you do with recursion is have a function call itself with a modified argument. So How Does It Work? One of the more common ways to demonstrate that is with a factorial, which is exactly what I'm going to do. As you know, a factorial is a number times all the whole num

| Hits: | 59 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
for / in - How to use the for / in loop to loop through an objects properties
The for / in loop is used to access all the properties of an object. I have used this many a times in my scripts, and fine it extremely useful.

| Hits: | 78 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
return - Quick tutorial showing you how to use the return statement in functions
A very useful statement found anywhere inside functions is the return statement. It can be used to return a value from the function.

| Hits: | 66 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
try / throw / catch - How to use try / catch, and also throw your own errors
The try / catch provides a way for you to trap errors and handle them gracefully. The way it works is if an error occurs in the try part, then execution goes to the catch part where you can provide additional code to handle the error, this could be a simple alert box, or more code to offer another way.

| Hits: | 69 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
nodeType - Used to return an integer node type of it's respective object
The nodeType method is used to return the node type of it's respective object. Node types return as integers. Elements have a node type of [1], text nodes have a node type of [3], and comment nodes have a node type of [8].

| Hits: | 89 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
appendData() - How to append strings to textnodes
The Javascript appendData() method is used to append strings to textnode objects. Parameters: string | Required. Defines the string value to be appended. appendData() takes one parametere. This parameter specifies the string value you wish to append to the textnode object.

| Hits: | 76 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
break, continue, and labels - How to break your loops & skip iterations
In this tutorial I will cover break and continue, as well as showing you how to break outer loops by using a label. The break statement is used to stop execution of the current loop. It can be used in loops such as for, do / while, and while. Let's have a look at some examples of how to use it.

| Hits: | 30 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
insertRow() & insertCell() - The insertRow() and insertCell() function explained
The insertRow() and insertCell() functions are used to add rows (tr's) and cells (td's) into a table which is already on the page. Here's a small table code on which we will be using insertRow() and insertCell().

| Hits: | 19 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
indexOf() - Used to define the placement of character chains.
indexOf() grabs a specified character chain from an object and returns it's placement within the string. indexOf() returns -1 when the character chain cannot be found.

| Hits: | 19 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Encryption / Decryption - How to create your own simple algorithm
By request of a regular visitor to this website, I shall be showing you how to create a simple encryption / decryption algorithm. Please note, that this tutorial will only cover a simple way to encrypt / decrypt data, it should not be used to encrypt sensitive information. I will assume you have basic knowledge of JavaScript, which would include variables, functions, conditionals, for loops etc. The methods I will be introducing to you are, charAt(), charCodeAt(), and fromCharCode(). Th

| Hits: | 20 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Conditional If - Beginner tutorial covering the simple "if".
For our first "if" tutorial, I will cover just the simple use of the conditional "if". The "if" keyword is used to a evaluate an expression for a boolean value. A boolean is a value that evaluates to true or false. Let's look at a simple script so you can see how to use a basic conditional "if".

| Hits: | 23 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
createComment() - Creating comment nodes
This will be a quick tutorial just showing you how to append comments to the document. If you haven't already, read the "appendChild()" tutorial. I haven't really found a need to append comments to the document, I have only used it once so far. "createComment()" creates a comment node "" which can then be inserted into the document using "appendChild()" or other methods like "insertBefore()".

| Hits: | 56 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
appendChild() - How to append new nodes to existing nodes.
appendChild()" is used to insert new nodes at the end of the last node of the current node. First I will show you an example, and then walk through it.

| Hits: | 27 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Arguments - Alternate method of getting passed values in functions
I expect you to know the following things before reading this tutorial. - Arrays and ".length" - if() - for() - functions That should be all you NEED to know, but an extensive knowledge can always help. Now that that is out of the way, I'm gonna explain to you this code.

| Hits: | 60 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
Table Rows Reordering - How to reorder a table in alphabetical order
A few months ago I had a couple of people ask me how to reorder a table using nothing but JavaScript, and making it user selectable. Someone recently suggested I do a tutorial on it, so here it is, a simple tutorial covering one way of reording a table. What we will be doing is reording the rows (TR) of our table in alphabetical order, we won't be going into allowing the user to select the order, that is something you can do yourself, it isn't hard :).

| Hits: | 53 | Platforms: | Windows |
| Ratings: | Last Updated: | 2006-07-19 |
nodeName - Simple tutorial covering the user of the property "nodeName".
This will be a very simple tutorial showing you how to find out the name of a node. "nodeName" returns the name of a node, which can be used on elements and attributes. If you have ever used "tagName", then you will know they basically return the same result when used on an element. Also make note that the string returned from an element tag will be all in uppercase, doesn't matter what case it is in the source, it will return all uppercase.

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