This is shown in the next screen snapshot. This is done by selecting Tools -> JavaScript Browser Compatibility from the top menu bar of NetBeans. It is easy in NetBeans 6.1 to specify the targeted browsers. If we don't need to support a particular browser, that is one more source of potential inconsistency we do not need to worry about. The "targeted browsers" idea is useful because there may be situations in which we have the luxury of knowing which browsers we must support or, better yet, which we don't need to support. The auto-completion popup clearly shows that Internet Explorer 5.5 and Internet Explorer 6 are my "targeted browsers" that do not support this particular method. In this case, it indicates that one or more of my targeted web browsers does not support this method. The line through the getElementById method may look familiar to Java developers as used to indicate a deprecated Java method. The next screen snapshot (click on all screen snapshots to see larger versions) displays the auto-completion popup for the document object and the getElementById method that returns a Document. NetBeans auto-completion feature for JavaScript/DOM really helps here.
One frustration of working with JavaScript and DOM across different browser implementations is the availability of objects and methods in one browser but not another. In this blog entry, I will demonstrate some of these NetBeans JavaScript functions. JavaScript and DOM differences among the major browsers have long been a source of deep consternation for web developers and NetBeans does much to deal with browser idiosyncrasies. I have started using NetBeans 6.1 (beta) and have found its JavaScript support to be welcome and helpful.