Quote:
Originally Posted by Spidey1980
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.