There is a well-known bug in the Internet Explorer implementation of the
getElementById() method, which, contrary to the W3C standard, allows the method to return an element even if only the element’s
name attribute matches the requested
id. This snippet will easily correct that problem.
This function splits any well-formed URI into its parts (all are optional). All parts are split with a single regex using backreferences, and all groupings which don’t contain complete URI parts are non-capturing.
Use this snippet in an external file to call several functions using the onLoad event handler.
Use this snippet to obtain the URL which referred the user to that page. Be aware that on some servers this may not work.
When using strict doctypes the target attribute is not allowed for opening new windows. This script will accomplish that task easily and unobtrusively.
Use this prototype function to search through a multi-dimensional array. Simple yet efficient! Includes examples.
Need to load several functions after the page loads? Use this snippet to call several functions using the onLoad event handler. Easy to use.
Use this function to disable certain keys. This essentially tells the page to cancel the last event, e.g. the pressing of that certain key.
This snippet searches an array for a pre-specified element and returns ‘true’ if it’s found, ‘false’ if it’s not found. It functions like the in_array() in PHP.