This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes JavaScript interpreter  and HTML comment? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "JavaScript interpreter  and HTML comment?" Watch "JavaScript interpreter  and HTML comment?" New topic
Author

JavaScript interpreter and HTML comment?

carl varola
Ranch Hand

Joined: May 16, 2002
Posts: 59
Why is the JavaScript interpreter not confused by the method for hiding JavaScript from obsolete browsers? I understand that enclosing the script within a comment will be interpreted simply as a comment by a browser lacking the JavaScript interpreter. But why is the interpreter not confused by the comment opening? Thus, the interpreter will see is simply a JavaScript comment.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
Answer I have is that it was programmed to look for the tags. The eariler versions did not look at them so that is why they skip it. The other versions look at them and will also check to see what version is listed.
I from programmed this type of logic into things I have done with SQL, javaScript, & ASP.
Eric
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JavaScript interpreter and HTML comment?
 
Similar Threads
Interpretor Pattern: Need Help
Bogus Error in NetBeans 6.8 Editor
Create dynamic code
Doubt in Overloading
Where is JavaScript Processed?