He speaks the oath as I write this.
What a great moment!
Except where otherwise noted, this content is licensed under a Creative Commons License.
For a while now, my website is using XHTML. That by itself is working fine.
However, recently, I decided to actually set the appropriate MIME type for browsers that understand it (pretty much every modern browser except IE...)
The PHP code looks like this:
function SetMimeType() {
header("Vary: Accept");
if (stristr($_SERVER["HTTP_ACCEPT"],
"application/xhtml+xml"))
header("Content-Type: application/xhtml+xml;
charset=utf-8");
else
header("Content-Type: text/html; charset=utf-8");
}
So far, so good.
But then, I noticed some strange thing: all my code for writing dynamic text on the client side didn't work anymore.
It turns out that the Javascript code to write to the document, document.write, doesn't work if the MIME type is set to application/xhtml+xml.
The reason is that with this MIME type, the webpage is considered XML, and the XML parser can fundamentally not handle content changes while it is parsing the content.
The W3C has a short blurb on their website:
Does document.write work in XHTML?
No. Because of the way XML is defined, it is not possible to do tricks like this, where markup is generated by scripting while the parser is still parsing the markup.
You can still achieve the same effects, but you have to do it by using the DOM to add and delete elements.
A quick Google search came up with two pages (here and here) that discuss this problem in more detail, and that provide some code.
I've tried the code in the second link, and it worked fine in Firefox. Interestingly, though, only if the code is directly embedded in the page. Including it from a separate file like this:
<script type="text/javascript" src="write.js"></script>
unfortunately did not work.
But anyway, that's at least a way to get my rather simple document.write code to work again.
So, the UCI Alumni Association has sent out emails informing people of the opposition to Prop. 92 by the UC Regents, among others.
While the Regents may have a point, they undermine their own position by not cleaning up the wasteful spending at UC campuses.
A case in point is right here at UCI: instead of firing incompetent people like Bill Zeller and Kevin Ansel, they are "promoted away", and continue to get pretty good salaries.
If the Regents were really serious about the funding crisis, they would get such people fired, in particular since they have done considerable harm to the university's reputation.
Until then, the Regents' opposition to Prop. 92 is rather hollow. UC's funding crisis can't be all that bad if UC can keep demonstrably incompetent people employed...
Although one regent apparently has recognized that there is a lot of waste within UC, the whole UC governing body doesn't seem to want to act on that. Given that, they need to clean up their house first before they have any standing opposing Prop. 92.
Except where otherwise noted, this content is licensed under a Creative Commons License.
As usual, Illiad from User Friendly brings it to the point:
http://ars.userfriendly.org/cartoons/?id=20080203
'nuff said.
Except where otherwise noted, this content is licensed under a Creative Commons License.
For years, I had the BBC News ticker running on my laptop. This got me real news, not the crap that goes under "news" in the US...
Unfortunately, the BBC hadn't updated the ticker for years, and it didn't work all that well on XP.
I finally found the time to look around for a replacement. It turns out that the BBC offers a new ticker, as part of their BBC News Desktop Alert system. That works quite well.
I also found a Linux implementation of the BBC ticker. That solves my other main complaint about the news ticker, the lack of a Linux version.
Except where otherwise noted, this content is licensed under a Creative Commons License.
:: Next >>