20 Apr 2006 rmathew   » (Master)

HTML/CSS/JavaScript: Duh!
dorward: Thanks again for your comments. I don't know why it didn't occur to me to use GCC itself as a pre-processor. Some of the simple things I tried out worked well with GCC. I haven't checked out The Dolt yet.

As for condition #2 ("JavaScript disabled, Stylesheets enabled") mentioned in my previous post on this topic, I have found a better solution to the distracting "peek-a-boo" effect inherent in my previous solution. In the HEAD of the page, I have now put:

    <script type="text/javascript"><!--
      hideHiddenDivs( );
    // --></script>
where hideHiddenDivs() is defined as:
  function hideHiddenDivs( )
  {
    if( document.getElementById)
    {
      document.write(
        '<style type="text/css"> div.hidden { display: none; } </style>');
    }
  }
I could have put this scriptlet inline, but there seems to be a problem with the parser of the W3C validator tool which complains about a "</style>" that does not end a STYLE element.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!