Results 1 to 3 of 3

Thread: javascript: comments

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004

    javascript: comments

    Do we still need to use the HTML comments for script blocks or has that been revised?
    "Can't" and "shouldn't" are two totally separate things.

    All questions should be answered. All answers should be true. That is why I post.

  2. #2
    Fanatic Member riis's Avatar
    Join Date
    Nov 2001
    Posts
    551
    I don't think it's really necessary now, unless you want to serve content for really old browsers.

    They were used for IE3 / NN 2 and older browser versions (not sure if these are the correct versions). They didn't understand JavaScript (actually the script-tag), and would've displayed the JS code as HTML content. Commenting the code out was the only way to prevent it.
    For this purpose the noscript-tags were invented. Old browsers didn't understand those neither, so they'd display all content in between, while newer browsers skipped the content.

  3. #3
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    I've given up on supported browsers that don't run Javascript. Granted, I don't do anything truly fancy with it, so older browsers will just not have small functionality. If you haven't upgraded your browser in the past 3-4 years, then I don't feel sorry for you.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width