Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- Create this in external JS file please


lucy24 - 7:57 am on Jul 6, 2012 (gmt 0)


Don't include HTML comments <!-- --> in JavaScript.


:: peering into crystal ball ::

The tutorial told him to use them. The comment markup is necessary because older browsers don't know what javascript is so they simply display everything inside the <script> tags along with the rest of the page. That's "older" as in, uhm, MSIE <5 and the like. Browsers that are now only used by low-budget Estonian robots.

<editorial>
Once a tutorial gets in the habit of recommending something, it will never ever stop. It's like cookbooks telling you to Preheat The Oven even though most people no longer need to chop kindling, light the fire, let it burn up, wait for the temperature to stabilize etc-- all of which needs to be done ahead of time, because a soufflé does not wait. Or putting out dire warnings about playing in discarded refrigerators, even though the latch closing was last seen around 1957.
</editorial>


Thread source:: http://www.webmasterworld.com/javascript/4473018.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com