This topic has been closed. No new entries allowed.
Reason: You can now post comments on articles on Dev Opera
You need to be logged in to post in the forums. If you do not have an account, please sign up first.
43: The principles of unobtrusive JavaScript
Unobtrusive JavaScript refers to JavaScript that is used to enhance usability and improve the user experience on a web site, but isn't essential for functionality to work. The web site should work ok when JavaScript isn't supported in the user's browser, which will be the case with some users. In this article PPK explores the concept fully, providing multiple examples to help you master it.( Read the article )
although it's probably not the point of the article, i'd suggest a slight simple change.
window.open(this.href,'popup','arguments');
return false;
now, i haven't checked if this is still relevant, but i used to traditionally only return false if the window.open has indeed succeeded in popping up a new window and the function returns true...so something like
return !window.open(this.href,'popup','arguments');
(but i can see how this may confuse readers just starting out...though it could be added as a note or something?)
window.open(this.href,'popup','arguments');
return false;
now, i haven't checked if this is still relevant, but i used to traditionally only return false if the window.open has indeed succeeded in popping up a new window and the function returns true...so something like
return !window.open(this.href,'popup','arguments');
(but i can see how this may confuse readers just starting out...though it could be added as a note or something?)