1. Home
  2. Computing & Technology
  3. JavaScript

Problem Solving

No matter whether you are a beginner or an expert with Javascript programming you will have scripts that don't work. Here is some information to help you solve those problems.
Asking for Help
The best way to ask for help when you have a Javascript problem
What Javascript Cannot Do
There are a few things that the Javascript programming language does not let you do
Common Javascript Errors
Commonly made Javascript errors and how to find them
My Script Doesn't Work
The first step in working out why a script doesn't work is to determine if the problem is in the script itself or is a conflict with something else in the page.
Plain Text Please
Javascript needs to be saved as plain text if you want it to work
Debugging Javascript
Different browsers provide different options for locating Javascript errors.
Javascript and the Browser
Javascript has limited access to the browser and no access outside it but everyone is always asking how to change that.
Faster Loading Web Pages
A minor modification to the way we attach our JavaScript to the web page can make the web page load much faster for at least some of our visitors.
Validate Your HTML
Invalid HTML can stop JavaScript working in some browsers.
Onload and the DOM
A frequent cause of "object not found" errors is due to scripts that try to access elements in the web page before those elements have been loaded.
Combining onloads
Having multiple onload assignments in a page means only the last one will work. Here's an easy way to amend the code so they all work.
The JavaScript Modulo Bug
The modulo operator in JavaScript does not return the correct value for negative numbers.
Using Anonymous Functions to Bypass IE Name Bug
JScript insists on sticking a whole lot of variables into the global namespace that JavaScript doesn't. This is a possible cause for why JScript might not run as JavaScript or vice versa. You can avoid this field name clash completely using anonymous functions and get your code so it works the same in both JScript and JavaScript.
Polymorphic JavaScript Functions
Accidentally giving two functions the same name in JavaScript can cause problems for many beginners. Deliberately giving two functions the same name is a simple way of improving the efficiency of a lot of scripts.
JavaScript Encryption
This 6.6k real encryption algorithm written in JavaScript is almost small enough to make effective encryption using JavaScript possible. (Note that this still doesn't prevent people accessing the decrypted version of web page content once the page displays).
JavaScript Hashing
One way encryption is possible with JavaScript, it is just not very useful.
Effective Web Page Encryption
Effective Web Page Encryption - there is no such thing
Password Hashing
Does hashing the password before sending it to the server it make the data transmission more secure?
min-width and max-width in Internet Explorer 6
Internet Explorer 6 doesn't understand the min-width and max-width stylesheet attributes. By adding a proprietary stylesheet command and a few lines of JScript we can rectify this lack and get IE6 to behave the same way as the more standards compliant browsers do.
Single Radio Buttons
How to handle single radio buttons and unselecting radio buttons
Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript
  4. Problem Solving

©2009 About.com, a part of The New York Times Company.

All rights reserved.