View Single Post
Old 01-22-2012, 06:28 PM   PM User | #4
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,448
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
Quote:
Originally Posted by Spidey1980 View Post
Most of it still applies
Most of it does NOT still apply. The correct way to write modern JavaScript is completely different from the antiquated way that the book suggests. While that code still works and was acceptable when it was the only way to do it, little of what is in the book comes even remotely close to being the best way to write JavaScript now.

If you think in terms of tools then the book is giving you the equivalent of how to make a stone axe - which will still work but is nowhere near as good as a steel one.

Statements in JavaScript that used to be used but which now serve no purpose and which should be replaced by more modern equivalents include:

document.write
alert
eval

The header I suggested was the only one that did make any difference when I was writing tutorials on how to retrieve information from the server but that may be due to the way the server is configured.

Its a pity in some ways that I didn't have the time to write the replacement fot that book that the publishers actually asked me to write when they realised how outdated the new version of the book was.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is online now   Reply With Quote