byId() or $()

Roughly speaking: byId = document.getElementById. Since in Ajax programming you spend so much time on the latter, using the former in its place is quite a benefit.

dwr.util.byId() finds the element in the current HTML document with the given id, or if more than one parameter is passed, it returns an array containing the found elements. Any non-string arguments are left "as-is" in the reply. This function is inspired by the prototype library however it probably works on more browsers than the original.

See dwr.util.toDescriptiveString for a demo.

Technically speaking this will not work on IE5.0 because it uses Array.push however it is expected that this will only be used in conjunction with engine.js (which makes up for this omission). If you are using this function without engine.js and want IE5.0 compatibility then you should arrange for a replacement for Array.push.