Discussion on:

Message 3 of 3
0 Votes
+ -
RE: Graceful error handling in JavaScript
Speaking of JavaScript, this page's links to code listings use <nClick to open them in new windows. They also include href="#" in each link. Having the href in there causes the you to jump to the top of the article every time you click on a code listing. Taking the href attribute out will stop the jumping article, yet still allow users (with JavaScript) to access the code pop-up windows. (JavaScript links work without HREFs.)

It's a shame XHTML seems to be depricating the target attribute. That is/was a nice way to open new windows without having to resort to JavaScript.
Posted by Mikiel
Updated - 16th Aug 2007