• James Schend (unregistered) in reply to Shinobu
    Shinobu:
    And other browser vendors apparently agree, as both Firefox and Konqueror have stapped beyond the limits of the W3D standards.

    Firefox still uses EMBED tags for Flash. It might be "stapping" beyond the "w3d" standards in some areas, but it's a full decade behind in others.

  • waffles (unregistered) in reply to webrunner
    webrunner:
    Anyway, I was a fan of the W3C until I started dealing with the xhtml depreciations- they depreciated things without quick replacements. For example: there's no default tag that defaults to text-decoration:underline; in xhtml. To be compliant you have to use or re-format cite or something.

    That would be because it's generally considered a terrible idea to use underlines to mark anything but links on web pages.

  • JB (unregistered)

    I like Jeff Lubetkin's response and it explains alot, but I think Jeff is missing the point. To me, the WTFs are:

    1. Non-memeaningful comment
    2. No TODO marker or bag marker to indicate that the code needs to be revisited.

    While I think "please don't crash" is a bit funny, it reveals nothing about the issue.

  • JB (unregistered)

    Sorry, that previous post should have said:

    1. No TODO marker or bug marker to indicate that the code needs to be revisited.

    Bug. Not bag. WTF - I hit send too quick.

  • Aaron (unregistered) in reply to yafake
    yafake:
    As I said: A big WTF. People are still discussing about the non-existent conditional comments that they believe in so much, despite being shown that they don't exist, Microsoft told them BS, and it's actually a bug in IE being abused.
    Do you really believe this, or are you just trolling? A bug could not possibly produce that kind of behaviour.

    In your earlier post you said that they don't work, and that IE ignores the version number in the comment. Have you actually tried testing this theory of yours?

  • (cs) in reply to rycamor
    rycamor:
    Hacker/guru: Javascript is such a nice clean language! Too bad there's no good implementation for general programming. It would make a better all-purpose scripting language than most of the other crap we use. Imagine a Unix shell using Javascript!
    Funny you should say this - a few years ago I found myself working with Windows in a servery-type way, with a need to do various one-off and scripting type things - much the same as you'd use bash or Perl for in Unix. JScript/WSH spoiled me rotten, I confess; ever since then I've dearly wished for an equivalent combination on Unix, and I've always had the highest respect for Javascript as a language. (I just wish they'd stuck with Livescript rather than let the evil marketroids near it...)

    (Shame about JS.NET, though...)

  • (cs) in reply to JB
    JB:
    Bug. Not bag. WTF - I hit send too quick.
    I think it's subtler than that. Note the positions and order of the Submit and Preview buttons...
  • Aaron Bassett (unregistered) in reply to RON
    RON:
    Reminds me of AJAX. When Microsoft invented it (yep, you read that right, they invented it), everyone bitched about how it was useless and how it broke standards, yadda yadda.

    MS did not invent AJAX, come on if you are going to lecture at least get your facts right.

    They did introduce the XMLHTTPRequest object but thats not 'AJAX'. AJAX is a term for the use of several technologies in order to make client->server requests without refreshing the current page.

    These are normally done today using the XMLHTTPRequest object, I will grant you that. But they had been done previously using iframes, it just didn't have a catchy name then!

    So MS did not invent AJAX they invented 1 of the technologies comononly used within AJAX.

  • Aaron Bassett (unregistered) in reply to webrunner
    webrunner:
    Anyway, I was a fan of the W3C until I started dealing with the xhtml depreciations- they depreciated things without quick replacements. For example: there's no default tag that defaults to text-decoration:underline; in xhtml. To be compliant you have to use or re-format cite or something.

    the underline element is purely visual and as such should be dealt with by the CSS not by XHTML.

    You want to make something stand out, you already have the strong element. You want to emphasize something then use the em tag. Either of these could have their CSS set to include the text-decoration property (or add a class to them). And it would be much more semanticly correct than using a span and a class.

  • (cs) in reply to theultramage
    theultramage:
    Yell at MS for "breaking" standards if you wish, but honestly, that's ridiculous. MS, like most web developers I know, is sick of the W3C dragging its heels on shit that should have been made 10 years ago.

    Microsoft did this. And last time I checked msdn, they stated they were not going to change it, for backwards compatibility reasons.

    Well, i agree that it isn't standards compliant, but it's one of the things that's easy to work around. The only information you need from a pressed button is what the name of the button is (not the label, the name), and it gives you that information. Any other information you need to send can be stuffed inside an <input type=hidden>. Just something you need to keep in mind, the workaround doesn't even need to be an IE-only solution. The only things I hate about IE are the things that need separate IE-codeblocks because IE interprets stuff differently from how the standard depicts they should be. And ofcourse stuff that just can't be worked around.

    -edit- oh, and the statement that it sends all buttons (rendering the element unusable) is just plain false. Works fine here..

  • (cs) in reply to rycamor
    rycamor:
    BTW, It's funny how many developers like to disparage Javascript because of browser/DOM issues. The language itself is actually quite elegant, much more so than PHP, Perl, VB or a number of other popular languages. Mostly those who hate it fail to understand it. Spend some time at http://crockford.com/javascript/ and you might develop a newfound respect for Brendan Eich's brainchild.

    Personally, I think a developer's attitude toward Javascript might be a perfect assessment of experience:

    Newbie: Javascript is so cool! I can make things move in a web page.

    Coder: Javascript sucks! What a piece of trash language! I mean, you can't even write classes in it. And what's up with that weird function.prototype thingy?

    Hacker/guru: Javascript is such a nice clean language! Too bad there's no good implementation for general programming. It would make a better all-purpose scripting language than most of the other crap we use. Imagine a Unix shell using Javascript!

    So JavaScript is better than two crappy languages and an ancient one, and that makes it "elegant"? There are plenty of good powerful scripting languages out there (Python, Ruby, Groovy, etc) that have both well defined standards, full standard libraries, and don't have annoying quirks like the ability to define variables implicitly and explicitly (with the scope varying from definition to definition). There is no reason to settle on JavaScript just because it is better than PHP.

    Most of the "Javascript gurus" like you describe that I've met are those who have no knowledge of software engineering or computer science and who are just comparing the language to crap like PHP. But going through a tutorial on a website does not make you a hacker or a guru, it makes you a hack.

  • (cs) in reply to waffles
    waffles:
    That would be because it's generally considered a terrible idea to use underlines to mark anything but links on web pages.

    It's considered a terrible idea now to underline links at all. There are sites where it's actually impossible to spot certain links as there's nothing to indicate them. The name by each post on UBB is a link to that person's profile, but it's not underlined. You have to guess. phpBB still makes this text bold, but does not make it a link, so I keep clicking it and wondering why it does nothing. (I still found it easier than the inscrutable icons below posts in UBB.)

    Wikipedia has weird policies on links. For example, a phrase may be linked as a whole, or as two links. "Oak tree" for example could be one link, Oak tree, or (and this practice is extremely annoying) Oak tree. Because they turn off underlines, I read "Oak tree" as being a single link and click the "tree" part. I end up on a page about trees, not a page about Oak. I should probably set a Stylish rule to force underlines on Wikipedia to bypass their dreadful link usage.

    Incidentally ... does anyone here script Mac OS in JavaScript? Late Night Software made an Open Scripting Architecture extension that lets you script Mac OS (both X and pre-X) in JavaScript instead of AppleScript (same as how WSH is language-independent, only Apple did it properly instead of Microsoft's horrible mess of language-dependent features). AppleScript drives me batty; for some reason, it never makes any sense to me at all. I find little cause to script either of my Macs, else I'd probably contemplate reinstalling JavaScript for the Mac.

    The Mac dudes here might find it quite interesting to give it a go. Bonus points for those who use osaexecute (sp.?) instead of Script Editor so that they can do all their work from the command line.

  • (cs)

    I know it wouldn't be relevant in this case... but I'm thinking that direct use of JavaScript is one of those things like direct use of X calls, something which should be done by toolkits, and not by programmers. Fortunately there are some great well-integrated AJAX toolkits out there in the Java world, like Icefaces + JBoss Seam, for example. With that, you use it just like you would use any other Seam UI tags. If there's a bug or bad interaction, it can be fixed at the toolkit level.


    GSA web development services

  • at (unregistered) in reply to Remboooo
    Remboooo:
    theultramage:
    Microsoft did this. And last time I checked msdn, they stated they were not going to change it, for backwards compatibility reasons.

    Well, i agree that it isn't standards compliant, but it's one of the things that's easy to work around. The only information you need from a pressed button is what the name of the button is (not the label, the name), and it gives you that information. Any other information you need to send can be stuffed inside an <input type=hidden>. Just something you need to keep in mind, the workaround doesn't even need to be an IE-only solution. The only things I hate about IE are the things that need separate IE-codeblocks because IE interprets stuff differently from how the standard depicts they should be. And ofcourse stuff that just can't be worked around.

    -edit- oh, and the statement that it sends all buttons (rendering the element unusable) is just plain false. Works fine here..

    It is not. Just you're using IE7 which fixed it. Pressing both buttons is the real WTF theultramage referred to. Sending the content is workaroundable, as you say.

    It sent out this code:

    POST /~umage/temp/IE_sux_eng.php HTTP/1.1 Referer: http://netvor.sk/~umage/temp/IE_sux_eng.php Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; ... Host: netvor.sk Content-Length: 27 Connection: Keep-Alive Cache-Control: no-cache

    button1=text1&button2=text2

  • Cuack (unregistered) in reply to Daniel Beardsmore
    Daniel Beardsmore:
    Wikipedia has weird policies on links. For example, a phrase may be linked as a whole, or as two links. "Oak tree" for example could be one link, _Oak tree_, or (and this practice is extremely annoying) _Oak_ _tree_. Because they turn off underlines, I read "Oak tree" as being a single link and click the "tree" part. I end up on a page about trees, not a page about Oak. I should probably set a Stylish rule to force underlines on Wikipedia to bypass their dreadful link usage.

    They quarrel from time to time about if they should be underlined or not. If you create an account, you'll have an option at your preferences to have them underlined.

  • Kiss me, I'm Polish (unregistered) in reply to James Schend
    James Schend:
    Shinobu:
    And other browser vendors apparently agree, as both Firefox and Konqueror have stapped beyond the limits of the W3D standards.

    Firefox still uses EMBED tags for Flash. It might be "stapping" beyond the "w3d" standards in some areas, but it's a full decade behind in others.

    Firefox can use OBJECT tags for flash, and you can have a perfectly valid page with flash. See http://alistapart.com/articles/flashsatay (it's been there for 5 years!) The fact that Macromedia Flash spits out some quirky shit doesn't mean you are bound to use it.

  • Dan (unregistered)

    Man, I love all the bitchwhining about "AJAX", it's so deliciously pointless. Nobody "invented" it, the functions to grab data from the server and use it to affect the current page has been around almost as long as javascript has. Even before XMLHTTP.. The same effect can be achieved using frames or iframes, or by combining cookies with a dynamically generated image URL (and that technique was being used by a few people back then to do some interesting stuff). XMLHTTP just made it all a little bit easier.

    However the technique wasn't really generally accepted (or given it's slightly pointless label) until recently. Up until Google's 'Suggest' and Gmail, it was generally considered bad form to rely on javascript for anything that complicated. Then Google used it for some interesting things, and Jesse James Garret came along and gave it a silly name, and everyone went nuts.

  • (cs) in reply to Aaron

    Do you really believe this, or are you just trolling? A bug could not possibly produce that kind of behaviour.

    Thank you.

  • Anonymous Coward (unregistered) in reply to Aaron Bassett
    Aaron Bassett:
    webrunner:
    Anyway, I was a fan of the W3C until I started dealing with the xhtml depreciations- they depreciated things without quick replacements. For example: there's no default tag that defaults to text-decoration:underline; in xhtml. To be compliant you have to use or re-format cite or something.

    the underline element is purely visual and as such should be dealt with by the CSS not by XHTML.

    You want to make something stand out, you already have the strong element. You want to emphasize something then use the em tag. Either of these could have their CSS set to include the text-decoration property (or add a class to them). And it would be much more semanticly correct than using a span and a class.

    While I agree that underlining is purely presentation and should be handled by stylesheets, the original poster wanted underlining for citations. Citing sources, whether MLA or AMA (and no doubt others), usually requires underling certain portions. It has nothing to do with strength or emphasis, it's purely formating.

    Were I to code a citation, I would simply enclose the desired text in a span with class that used an underline.

  • (cs) in reply to webrunner
    webrunner:
    there's no default tag that defaults to text-decoration:underline; in xhtml.

    Yes there is: .

  • (cs) in reply to theultramage
    theultramage:
    Microsoft did this.
    Umm, I thought a form was supposed to send all its data? I'm surprised that some people expect two submit buttons in the same form to do two different things.

    I agree on the text-instead-of-value bug though, that's just plain wrong.

  • (cs) in reply to Faxmachinen
    Faxmachinen:
    I thought a form was supposed to send all its data? I'm surprised that some people expect two submit buttons in the same form to do two different things.

    No. A form is only supposed to send the data from controls that are "successful." Unchecked checkboxes and radio buttons are not successful, nor are any disabled fields. And the HTML spec, in section 17.3.2, states:

    If a form contains more than one submit button, only the activated submit button is successful.

    Therefore, IE 6 was wrong. They fixed it in 7, though they didn't fix the other bug.

  • rycamor (unregistered) in reply to nwbrown
    nwbrown:
    So JavaScript is better than two crappy languages and an ancient one, and that makes it "elegant"? There are plenty of good powerful scripting languages out there (Python, Ruby, Groovy, etc) that have both well defined standards, full standard libraries, and don't have annoying quirks like the ability to define variables implicitly and explicitly (with the scope varying from definition to definition). There is no reason to settle on JavaScript just because it is better than PHP.

    Heh... yes, I agree that it's not a full-featured programming environment (yet). That's something I would like to see. Javascript has a few quirks, as do all languages. I happen to really like Ruby. However, Ruby doesn't actually have an established spec, whereas Javascript does, with ECMAScript. AFAIR, Python doesn't even have a full formal spec.

    You might also find it interesting what the plans are for Javascript 2. Many of the quirks and limitations will be history.

    nwbrown:
    Most of the "Javascript gurus" like you describe that I've met are those who have no knowledge of software engineering or computer science and who are just comparing the language to crap like PHP. But going through a tutorial on a website does not make you a hacker or a guru, it makes you a hack.

    Thank you. I didn't say "Javascript guru". I'm talking about people like Joel Spolsky, Steve Yegge, the Mozilla dev team, many of the regulars at Lambda-the-Ultimate.org People who have done real software for years. And no, I don't include myself among the gurus. I am just one who tries to understand.

  • rast (unregistered) in reply to JayTee
    JayTee:
    I think you'll find that the *language* isn't to blame. It's the browser implementation of the language.

    This is like communism not being to blame, just the real-world implementations of communism.

  • Some dumb guy (unregistered) in reply to Random832
    Random832:
    How do you do it with the Netscape 4 model? Well, first you have to make a new hidden layer, with the SRC being the bit you're requesting from the server. Then you read from the... wait, what? no document.read()?

    "AJAXy stuff" requires the ability to make fresh data from the server available to a script.

    And you do that with framesets. (Back then to reach across all browsers.) Set one to 100%, the other to *, then fire away. Incoming stuff on the hidden frame just reads into the correct area creating/updating layers as needed.

    Just cuz you didn't know how to do it doesn't mean there wasn't those of us doing this since the version 4 browsers.

  • insta (unregistered) in reply to webrunner

    There have been alternatives, nobody wanted to adopt them because too many coding dinosaurs can't get away from tables and tags.

    An underline tag is NOT semantic. You're underlining text for a reason. If it's to emulate a link ... use an anchor tag. If it's to make a word stand out, emphasize it with and change the default styling of . It works with CSS the way you want, it lets people change it if they want, and it works with browsers that don't have CSS capabilities for whatever resaon (display limitations, administratior limitations, version limitations, whatever).

    Don't fight the tools, they (mostly) make sense if you use them as you're supposed to.

  • sol (unregistered)

    The core WTF here is that there should be one and only one browser. The browser should be produced by W3C (OMFG)

    The secondary WTF is that marketing is more important than quality. Trendy lingo and consumer perception should not be involved in Computer Science or IT...

    Libs->Some programmer some where has to know WTF he is doing to write you a lib in the first place. You are better off knowing how a lib works than not.

    Web 2.0/AJAX->Trendy lingo.....

    JavaScript is a good thing. It is great that we have browser that support it. It is great that document.all went away and we have document.getElementById...

    CSS -> CSS is great.

    XHTML1.0 -> XHTML1.0 is a good thing too, but it is not good to depreciate every bit of HTML or a good chunk of it, and then have google say this is how public sites should be if they want to be index "properly".

    Search Engine Robots && Search Engine Gurus -> Scam -> You can pay for top placement and buy keywords. I can buy Britney Spears if she hotthis month and up my place ment... for my page that has nothing to do with Britney... yeah that is ethical...

    Constant Change of development mediums/frameworks/and etc. -> Scam -> $$$ -> $$$ -> $$$ -> $$$ -> If every year they introduce some new best solution for all problems how can it be the best?

    Again we should sue these bastards for mental damages....

    <input type="submit" value="Look The Damn Value" />
  • sol (unregistered)

    Damn I forgot to say this:

    "You do not know the power of Microsoft.Net!" "I must obey my manufacturer!"

  • Ornedan (unregistered) in reply to rast
    rast:
    JayTee:
    I think you'll find that the *language* isn't to blame. It's the browser implementation of the language.

    This is like communism not being to blame, just the real-world implementations of communism.

    Quite so. Some loser botching the implementation of an idea (intentionally in the case of certain instances of real-world communism) doesn't mean the idea is bad. It might imply that idea is hard to implement correctly, but that doesn't imply badness on the part of the idea, either.

  • Adam101010 (unregistered)

    Why JPEG? Why is it so overused? Is it the only format you have ever heard about? No way...

    When you want to save a screenshot, or anything without any photographic content, please use (or at least consider) PNG or something similar. It has much better quality (it is lossless), and it is even SMALLER than JPEG! Use JPEG only for your photos, and not for anything else (within reason).

    http://en.wikipedia.org/wiki/PNG#Comparison_with_JPEG

  • felix feliciter (unregistered) in reply to Frymaster
    Frymaster:
    The alternative to conditional comments is the horrible system of hacks many CSS "gurus" use, which involves exploiting various parsing errors in various versions of IE in order to allow parts of the CSS to be bypassed or not, depending. For some reason they feel this is a better solution (and then moan when something new - like IE7 - comes along which isn't bug-compatible with IE6)

    USE SERVER SIDE INCLUDES.

    That deserves caps.

    SSI allows you to do simple comparisons on user agent strings and include various strings as a result. These strings are sent to the end user's browser to be interpreted as HTML or what have you. It's well suited to the task. It's an old technology, and not widely used, but it's available on Apache and IIS.

  • Nonymous (unregistered) in reply to webrunner
    webrunner:
    I find it funny that the Script tag allows you to put all sorts of different content types in it, but there's only what, three, that browsers will ever read?

    Anyway, I was a fan of the W3C until I started dealing with the xhtml depreciations- they depreciated things without quick replacements. For example: there's no default tag that defaults to text-decoration:underline; in xhtml. To be compliant you have to use <span style='text-decoration:underline;> or or re-format cite or something.

    Wrong, and you should really read about the issues before you start bad mouthing the W3C.

    The element has never been valid in HTML 4.01 Strict, and it being deprecated has absolutely nothing to do with XHTML.

    It was deprecated because underlined text is typically associated with links, and there was no semantic value in . You don't need , you should be using semantic markup. And it's generally considered bad practice to underline something that isn't a link anyway.

    I haven't a clue how reformatting cite is a work around. Cite is for citations.

    It's best to read about issues before you start flaming. :)

  • Nonymous (unregistered) in reply to felix feliciter
    felix feliciter:
    Frymaster:
    The alternative to conditional comments is the horrible system of hacks many CSS "gurus" use, which involves exploiting various parsing errors in various versions of IE in order to allow parts of the CSS to be bypassed or not, depending. For some reason they feel this is a better solution (and then moan when something new - like IE7 - comes along which isn't bug-compatible with IE6)

    USE SERVER SIDE INCLUDES.

    That deserves caps.

    SSI allows you to do simple comparisons on user agent strings and include various strings as a result. These strings are sent to the end user's browser to be interpreted as HTML or what have you. It's well suited to the task. It's an old technology, and not widely used, but it's available on Apache and IIS.

    WRONG. And that deserved caps too. There is absolutely no reliable way to know what the browser on the other end is at the server. A client side solution is the only option.

    This is such a big issue that Safari actually spoofs it's user agent string to some big name sites so they don't sent it special "fixed" content that is horribly broken when the regular content would be just fine.

    Conditional comments are 100% reliable. They only target IE, always, and there's no chance for error. No UA string parsing that's completely unreliable, no extra server side processing, they just work.

    (Btw your description of SSI is wrong. SSI is just text replacement on the server. The file is composited into a single file and the browser never knows what files were used.)

  • M.G. (unregistered) in reply to rycamor
    rycamor:
    Hacker/guru: Javascript is such a nice clean language! Too bad there's no good implementation for general programming. It would make a better all-purpose scripting language than most of the other crap we use. Imagine a Unix shell using Javascript!

    Been living under a rock? Try looking at SEE: Simple ECMAScript Engine (http://www.adaptive-enterprises.com.au/~d/software/see/). Even includes the see-shell.

  • (cs) in reply to Nonymous
    Conditional comments are 100% reliable. They only target IE, always, and there's no chance for error. No UA string parsing that's completely unreliable, no extra server side processing, they just work.
    They only "only target IE" because no-one's had the bright idea to use it to block content from non-IE users. If anyone did that, you can bet that some other browser would start supporting them and pretending to be IE that way.
  • yafake (unregistered) in reply to Aaron
    Do you really believe this, or are you just trolling?
    I don't just believe this, it's a trivially provable fact.
    A bug could not possibly produce that kind of behaviour.
    Well, and it simply doesn't. This bug only allows to differ between IE and non-IE, and nothing else. As you may notice, the above will always include both the IE6 and IE7 formattings on both IE6 and IE7.
    Have you actually tried testing this theory of yours?
    It's not a theory, it's a well-known fact, and of course did I try it out. You should too, maybe you'd notice that this is true.
  • Greg (unregistered) in reply to Kiss me, I'm Polish
    Kiss me:
    James Schend:
    Shinobu:
    And other browser vendors apparently agree, as both Firefox and Konqueror have stapped beyond the limits of the W3D standards.

    Firefox still uses EMBED tags for Flash. It might be "stapping" beyond the "w3d" standards in some areas, but it's a full decade behind in others.

    Firefox can use OBJECT tags for flash, and you can have a perfectly valid page with flash. See http://alistapart.com/articles/flashsatay (it's been there for 5 years!) The fact that Macromedia Flash spits out some quirky shit doesn't mean you are bound to use it.

    It's half correct. If you use object tags in the standards-compliant way that works in Mozilla, they won't work in IE. That's why Mozilla never dropped support for the embed tag, because using an object in the broken IE way and an embed is the only way to have the same code work in all browsers.

  • sol (unregistered) in reply to Greg
    Greg:
    Kiss me:
    James Schend:
    Shinobu:
    And other browser vendors apparently agree, as both Firefox and Konqueror have stapped beyond the limits of the W3D standards.

    Firefox still uses EMBED tags for Flash. It might be "stapping" beyond the "w3d" standards in some areas, but it's a full decade behind in others.

    Firefox can use OBJECT tags for flash, and you can have a perfectly valid page with flash. See http://alistapart.com/articles/flashsatay (it's been there for 5 years!) The fact that Macromedia Flash spits out some quirky shit doesn't mean you are bound to use it.

    It's half correct. If you use object tags in the standards-compliant way that works in Mozilla, they won't work in IE. That's why Mozilla never dropped support for the embed tag, because using an object in the broken IE way and an embed is the only way to have the same code work in all browsers.

    And the browser wars rage on!

    Considering IE first implmemnted <object></object> I would think they have the right to say FireFox broke it....

  • wien (unregistered) in reply to yafake
    yafake:
    It's not a theory, it's a well-known fact, and of course did I try it out. You should too, maybe you'd notice that this is true.
    Seeing as though I use this feature with great success almost daily, you are so completely wrong it's humorous. :)

    Have a look (not that I think you will): http://msdn2.microsoft.com/en-us/library/ms537512.aspx

  • yafake (unregistered) in reply to wien
    Seeing as though I use this feature with great success almost daily, you are so completely wrong it's humorous. :)
    Are you stupid or what? I told you exactly that it works, in a limited way, for a different reason, and I provided evidence: <!-->This is a comment.<!--> <!-- foo>This is a comment.<!--> <!-- [foo]>This is a comment.<!--> <!-- [if foo]>This is a comment.<!--> <!-- [if gte IE5]>This is a comment.<!-->

    All works the same, and you can verify that. Even further, rendering such comments is obviously WRONG, WRONG, WRONG.

    Have a look (not that I think you will): http://msdn2.microsoft.com/en-us/library/ms537512.aspx
    And this documentation about WRONG facts which exist do DELIBERATELY DELUDE people into thinking that a well-understood BUG would actually be a feature will change exactly what about the REAL-WORLD FACTS?

    Oh, and just to mention that this documentation is grossly wrong: <![if !IE 5]>

    Please upgrade to Internet Explorer version 5.

    <![endif]>

    is definitely not valid HTML.

    Now will you stop bullshitting me and SIMPLY TRY IT?

  • rlively (unregistered) in reply to yafake
    yafake:
    <!-->This is a comment.<!--> <!-- foo>This is a comment.<!--> <!-- [foo]>This is a comment.<!--> <!-- [if foo]>This is a comment.<!--> <!-- [if gte IE5]>This is a comment.<!-->

    All works the same, and you can verify that. Even further, rendering such comments is obviously WRONG, WRONG, WRONG.

    You are incorrect. I tested these lines myself in IE6 and the only one that did anything was the first line

    <!-->This is a comment.<!-->
    I tested each one individually to make sure that having multiple on the same page didn't interfere, and still line 1 was the only one that "worked." Yes, IE only displays anything for that line because of a bug in its parsing of SGML comments. That doesn't mean that conditional comments don't exist though, see below.

    By the way, the reason this line:

    <!-- [if gte IE5]>This is a comment.<!-->

    doesn't do anything is because it doesn't follow the syntax listed on the page wien mentioned. It should be:

    <!--[if gte IE 5]>This is a comment.<![endif]-->

    and then IE 5 or greater will display the message.

    However, and pay close attention here because this is where you are proven wrong, if you change the text inside the conditional comment to be lte instead of gte like so:

    <!--[if lte IE 5]>This is a comment.<![endif]-->

    then IE 6 will no longer show the message. Similarly, changing it to gte IE 6 allows IE6 to see it again, as does lte IE 6. But if you change it to lt IE 6 or gt IE 6, IE 6 will no longer display it. This proves that the expression is indeed being parsed and evaluated conditionally, as it states on the MSDN page.

    And yes, I actually tested every single combination I discussed in this post. My question is - did YOU actually test your own claim?

  • rlively (unregistered) in reply to yafake
    yafake:
    Oh, and just to mention that this documentation is grossly wrong: <![if !IE 5]>

    Please upgrade to Internet Explorer version 5.

    <![endif]>

    is definitely not valid HTML.

    You do have a point here - the "downlevel-revealed conditional comments" are not well-formed HTML or XHTML, but the "normal" "Downlevel-hidden conditional comments" are - the lesson being that using Conditional Comments to feed IE special CSS or JavaScript to fix a bug or rendering problem in that browser will work fine, but using it to feed HTML to non-IE browsers doesn't work so well.

    http://validator.w3.org:

    This Page Is Valid XHTML 1.0 Strict!

    The uploaded document "ConditionalComment.html" was checked and found to be valid XHTML 1.0 Strict. This means that the resource in question identified itself as "XHTML 1.0 Strict" and that we successfully performed a formal validation using an SGML or XML Parser (depending on the markup language used).

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    	<head>
    		<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    		<title>Conditional Comments</title>
    	</head>
    	<body>
    		<!--[if gte IE 6]><p style="border:1px solid blue; padding: 10px; background-color: silver;">You are running IE 6 or above.</p><![endif]-->
    	</body>
    </html>
    
  • Adam (unregistered) in reply to T$

    Those aren't comments (ok well they are) But they are functional comments, IE Conditionals, very useful in fixing browser inconsistencies.

  • rlively (unregistered) in reply to yafake
    yafake:
    Are you stupid or what? ... Now will you stop bullshitting me and SIMPLY TRY IT?

    So, yafake, you had no compunctions in calling people stupid before, but you have nothing to say when someone actually calls your bluff?

  • Dennis (unregistered)

    The crash-preventing comment is obviously magic.

    Captch: stinky (sorry the taco had beans in it)

  • Tony (unregistered) in reply to sol
    sol:
    hmm why not use javascript to load javascript files and render them... you know run the check the browser and then use ajax to load you neat well made browser specific javascript....

    you know something really easy to maintain like this:

    <script>document.write("\<script\>document.write(\"foo\");\</script\>");</script>

    I've seen it done. It actually worked very well.

  • ChrisH (unregistered) in reply to Random832
    Random832:
    ChrisH:
    <soapbox>We actually had the ability to do AJAXy stuff without XHR. People smart enough to know how were smart enough not to go splashing it around at every opportunity. </soapbox>

    How do you do it with the Netscape 4 model? Well, first you have to make a new hidden layer, with the SRC being the bit you're requesting from the server. Then you read from the... wait, what? no document.read()?

    Before using layer SRC there was always img src to make the request. As for reading.. I'm not saying it was pretty. But here were/are ugly ways to get the requested data back to the user agent. Thing is it was very slow in the client, slow on the server and in times of low bandwidth, the experience was worse than getting a page to load again.

  • yafake is a retard (unregistered)

    I though yafake was just an obvious troll that everyone was ignoring. Turns out yafake was just a full-on retard, and that he actually did believe his bullshit. I'm not sure if I should laugh at him or feel sad for him.

    Fucking retard, lol.

Leave a comment on “A Plea from the Heart”

Log In or post as a guest

Replying to comment #:

« Return to Article