IE, DHTML, onclick, and anonymous functions
By Xaxio
So! I’m using the DOM to create dynamic popups, and I’ve just discovered that in order to create something that will work across all browsers without having to tell IE that an element is itself, you should us an anonymous function, i.e.:
myNewNode.onclick = function(){alert("Testing!");};
After adding the onclick property of the node (NOT via using setAttribute), you may *then* add the node as an appropriate child node to other elements on the page. Or, assuming that you’ve kept a reference to the node and didn’t simply leave it on the heap somewhere known only to JavaScript, you may add it later
IE7 and border-bottom bug
By Xaxio
I’ve just discovered that IE7 has issues with border-bottom. It doesn’t seem to want to always draw the bottom border of text placed within a <h4> for some reason. This is the solution:
display: inline-block; vertical-align: bottom;
Edit: You know what? I think I might be the first person to publish this one ^_^



December 4th, 2007