If all else fails, invent a new language



  • Found something that humoured me for a while on a forum - if you can't do what you want within language restrictions.... just pretend you can and then post for help when it doesn't work:

    <style>
    <!--
    .trbox
    {
    background-color:#FFFFC3;
    onmouseover:"this.style.background":#FF00FF;
    onMouseout:"this.style.background":#FFFFC3;
    onClick:"this.style.background":#FFFFFF;
    }
    -->
    </style>



  • You're saying the forum post was complaining that it didn't work? 
    Are you sure this wasn't simply written to illustrate the functionality
    the forum poster desired?



    If someone actually tried putting that in the page and was then
    complaining that it didn't work, then yes, that's an amusing WTF. 
    But it looks more like deliberately illustrative pseudo-CSS.



    Regardless of which case it was, I hope the only reply was "See http://www.w3.org/TR/CSS21/".




  • mouseout?



  • I think the PROPER way to do this would be:
    <style type="text/css">
    <!--
    a.trbox { background-color:#FFFFC3; }
    a.trbox:hover { background-color:#FF00FF; }
    a.trbox:visited {
    background-color:#FFFFFF; }
    -->
    </style>


    Although, I could be mistaken.
    It looks like they were simply trying to integrate JS and CSS (JCSSS?)



  • Yes, the poster started a new thread and asked why this was not working...



  • @danielpitts said:

    I think the PROPER way to do this would be:
    <style type="text/css">
    <!--
    a.trbox { background-color:#FFFFC3; }
    a.trbox:hover { background-color:#FF00FF; }
    a.trbox:visited {
    background-color:#FFFFFF; }
    -->
    </style>


    Although, I could be mistaken.
    It looks like they were simply trying to integrate JS and CSS (JCSSS?)



    There really was a "JSSS," and wouldn't you know it, Netscape 4.x "supported" it!



    By "supported" of course I mean "crashed" when faced with it.



  • @nipper said:

    mouseout?

    Yes, the Javascript event fired when the mouse cursor leaves an element is "onmouseout", which obviously mirrors the "onmouseover" fired when the cursor enters an element...

    Javascript is full of fully little things like that which make your life a little more painful.

    Truth be told, core Javascript (as opposed to DOM, which is a frigging pain to work with when you have to build Xbrowsers scripts) is fairly consistend and doesn't have that many quirks.

    Still has enough to be annoying.



  • Well I guess it can be done ( quirksmode )...

    nonDev


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.