IE conditional comments not quite working

Discussion in 'HTML' started by delerious@no.spam.com, Dec 26, 2003.

  1. Guest

    I've managed to find a computer with just IE 5.0 on it, so I'm trying to test
    out my conditional comments. They're not quite working.

    The browser version number is 5.00.2614.3500

    Here are the conditional comments I have tried, and whether or not they work:

    <!--[if IE 5]> this one should work, and it does work
    <!--[if IE 5.0]> this one should work, but it does NOT work
    <!--[if IE 5.0026143500]> this one should work, but it does NOT work
    <!--[if IE 5.2]> this one should NOT work, but it DOES work

    It looks like IE is ignoring the zeros after the 5, so that is why the check
    for 5.2 works. Does this mean that if there is a build of IE 5.0 with version
    number 5.00.5321.5900, then that build of IE 5.0 will pass a check for 5.5?

    I have some HTML that must be displayed for IE 5.0 and not IE 5.5. So I
    cannot use the <!--[if IE 5]> check.

    Any ideas?
    , Dec 26, 2003
    #1
    1. Advertising

  2. brucie Guest

    in post <news:>
    said:

    > I've managed to find a computer with just IE 5.0 on it, so I'm trying to test
    > out my conditional comments.


    you're really obsessing about particular browsers. stop it, its not
    healthy.

    --
    brucie
    26/December/2003 06:12:55 pm kilo
    brucie, Dec 26, 2003
    #2
    1. Advertising

  3. Richard Guest

    wrote:

    > I've managed to find a computer with just IE 5.0 on it, so I'm trying to
    > test out my conditional comments. They're not quite working.


    Forget checking for browser and even more so the version.
    What you need to do is check to see if the browser accepts the function or
    not.
    e.g.
    if {document.images}

    If it works, the function continues to load the images.
    If not, the visitor suffers and waits.

    Do you realize how many browsers there are and how many versions of each
    one?
    So you check your stats and you find 90% of your visitors using a browser
    you never heard of.
    Whatchya gonna do now?

    Not to mention all that testing you need to do to find out if it works right
    or not.
    Richard, Dec 26, 2003
    #3
  4. Richard wrote:
    > if {document.images}


    You do know that curly brackets are entirely invalid wrong there, right?
    Leif K-Brooks, Dec 26, 2003
    #4
  5. brucie Guest

    in post <news:cOXGb.114$>
    Leif K-Brooks said:

    >> if {document.images}


    > You do know that curly brackets are entirely invalid wrong there,
    > right?


    but they look pretty

    --
    brucie
    27/December/2003 10:58:49 am kilo
    brucie, Dec 27, 2003
    #5
  6. Richard Guest

    brucie wrote:

    > in post <news:cOXGb.114$>
    > Leif K-Brooks said:


    >>> if {document.images}


    >> You do know that curly brackets are entirely invalid wrong there,
    >> right?


    > but they look pretty


    Yeah. they look better.
    Of course I know it should be [document .images].
    Ok. Would you believe ( )?



    > --
    > brucie
    > 27/December/2003 10:58:49 am kilo
    Richard, Dec 27, 2003
    #6
  7. Andy Dingley Guest

    On Fri, 26 Dec 2003 14:43:20 GMT, Leif K-Brooks
    <> wrote:

    >Richard wrote:
    >> if {document.images}

    >
    >You do know that curly brackets are entirely invalid wrong there, right?


    They're not _entirely_ invalid, just mis-used.

    "Conditional comments" though are just another bizarre cargo cult from
    M$oft. Square brackets [ ] have no meaning inside a comment and
    pretending that they do (even if you happen to be His Satanic Billness
    himself) will just end in frustration (although if you're HSB, it's
    usually the others who get frustrated).

    --
    Klein bottle for rent. Apply within.
    Andy Dingley, Dec 27, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alec S.
    Replies:
    10
    Views:
    10,116
    Alec S.
    Apr 16, 2005
  2. J. W. McCall
    Replies:
    3
    Views:
    364
    Bengt Richter
    Aug 6, 2003
  3. DanWeaver
    Replies:
    0
    Views:
    271
    DanWeaver
    Apr 13, 2008
  4. Replies:
    2
    Views:
    318
    sk_usenet
    Apr 30, 2008
  5. Gary Mayor
    Replies:
    3
    Views:
    272
    Rob Swindells
    Mar 4, 2004
Loading...

Share This Page