Tue 19th Sep 2006
Posted late evening, filed under
Smarty Templates.
I’ve been racking my brain thinking about how to get child categories of a specific category. And I think I’ve just figured it out.
Examine all of the other categories in a complete list, and grab all of them that have the current page’s URL at the start. The next word will be the sub-category .
Of course, knowing how to split stuff in Smarty is a bit difficult. I was thinking in JavaScript…
It Don’t Hurt • Sheryl Crow • The Globe Sessions ★★½
Tue 19th Sep 2006
Posted lunch time, filed under
Asides ,
Humour.
My pirate name is:
Calico James Flint

Often indecisive, you can’t even choose a favorite color. You’re apt to follow wherever the wind blows you, just like Calico Jack Rackham, your namesake. Like the rock flint, you’re hard and sharp. But, also like flint, you’re easily chipped, and sparky. Arr!
Get your own pirate name from piratequiz.com.
part of the fidius.org network
Tue 19th Sep 2006
Posted early in the morning, filed under
JavaScript.
I need a simple wrapper for a Mozilla/Safari and IE compatible XMLHttpRequest().
Perhaps something like (courtesy of Apple):
function loadXMLDoc(url,method,readyFunc) {
req = false;
if (method) method = "GET";
// branch for native XMLHttpRequest object
if(window.XMLHttpRequest) {
try {
req = new XMLHttpRequest();
} catch(e) {
req = false;
}
// branch for IE/Windows ActiveX version
} else if(window.ActiveXObject) {
try {
req = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
req = false;
}
}
}
if(req) {
req.onreadystatechange = readyFunc;
req.open(method, url, true);
req.send("");
}
return req;
}
Tue 19th Sep 2006
Posted in the wee hours, filed under
JavaScript ,
Rants and Raves.
Apparently, document.documentURI and document.location are not identical. Basically, document.location is not a string, so to treat it like one, you need to do:
(document.location+"").split("/")
Instead of:
document.documentURI.split("/")
Stupid IE.