Missing Parameter on Function Call
When you define a function you define the number of arguments that the function is expecting to receive. When you write the code to call the function you need to pass the appropriate parameters expected by the call. It is relatively easy to check how many parameters that a function expects to receive when you are coding a call to that function. If the arguments have been given reasonable names it should also be reasonably obvious what needs to be passed in each parameter.
Where this becomes a possible problem is if you decide to add an extra argument to the function. All calls to this function now need to be updated to pass the extra parameter. If the function is in an external Javascript that is linked into many of the web pages on your site then it is easy to miss a call to the function from one of the pages.
Unsupported Document Object Model
The W3C standard document object model is supported by most modern browsers including Internet Explorer 5+, Opera 5+, and Netscape 6+. Presumably you are using one of these browsers yourself and so scripts that are coded to use the standard DOM will work when you test them in your browser. Some of your visitors may be running earlier browsers such as Internet Explorer 4 or Netscape 4. If you want your script to support these visitors as well then you will need to code your script to use the cross browser DOM.
There are many scripts that can be downloaded from the internet that date back to the IE4/NS4 days and so the scripts only support those browsers and more recent versions of Internet Explorer (that still support the IE4 DOM for backwards compatibility). These scripts will not function on browsers other than Internet Explorer and/or Netscape 4.
To rectify this problem you should rewrite the script to use the standard DOM or cross browser DOM instead of the IE4/NS4 specific ones.
You can tell if a script uses the old DOMs if it references document.all or document.layers.

