JavaScript Tutorials
Finding the Length of a String in JavaScript
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.
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.
Converting to Lower Case and Upper Case in JavaScript
To convert a string to lower case in JavaScript we use the following steps...
To convert a string to lower case in JavaScript we use the following steps...
Restoring Form Field Values
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.
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.
Search Engine Spider-Friendly JavaScript Content
If you have syndicated content delivered with JavaScript, the content might not be indexed by the search engines.
If you have syndicated content delivered with JavaScript, the content might not be indexed by the search engines.
Working... Popup for Forms
Find out how to display a "Working..." popup window to let visitors know a form submission is being processed. The popup closes automatically as soon as the "thank you" page is finished loading.
Find out how to display a "Working..." popup window to let visitors know a form submission is being processed. The popup closes automatically as soon as the "thank you" page is finished loading.
How To Hide Your JavaScript With PHP!
Don't want your JavaScript copied? Here's a very simple script that will hide it!
Don't want your JavaScript copied? Here's a very simple script that will hide it!
Building an Expanding DHTML menu in with CSS & Javascript
Let's build a menu... this is not like your normal dropdown menu, which appears at the top of your content. These menus expand and remain visible until they are collapsed with the click of a mouse. The menu content actually expands with your page content, pushing down whatever is below the menu - so it can actually be used for more then just a menu (I might explore that a little later in another tutorial).
Let's build a menu... this is not like your normal dropdown menu, which appears at the top of your content. These menus expand and remain visible until they are collapsed with the click of a mouse. The menu content actually expands with your page content, pushing down whatever is below the menu - so it can actually be used for more then just a menu (I might explore that a little later in another tutorial).
Redirecting URL using JavaScript
Whenever you want to generate dynamic pages you often have to resort to using some server side scripting language such as PHP or ASP. But let us assume that there are only three or four pages that could be chosen from a drop-down menu (a combo-box). The following procedure helps you create a JavaScript-supported drop-down menu.
Whenever you want to generate dynamic pages you often have to resort to using some server side scripting language such as PHP or ASP. But let us assume that there are only three or four pages that could be chosen from a drop-down menu (a combo-box). The following procedure helps you create a JavaScript-supported drop-down menu.
Disabling the Right-click Mouse Button
Sometimes you don't want the visitor to be able to click the right mouse button and do all the stuff associated with it. Although personally I'm not in favor of such gimmicks and limit the visitor's independence, you learn something new in this tutorial.
Sometimes you don't want the visitor to be able to click the right mouse button and do all the stuff associated with it. Although personally I'm not in favor of such gimmicks and limit the visitor's independence, you learn something new in this tutorial.
