Friday, November 16, 2007

I've been crazy busy lately. I'm still crazy busy but I've decided to make a post here. I'm going to start posting little snippets of code that I've found useful or problems that I've resolved that I want to keep the solution to around.

Log story short I needed a TreeView to postback when the checkbox associated with an element changed. This search led me to This Post. The solution proposed there works great however there's one issue that took me a long time to hunt down. The last post on the page lists some script to spit out after you've created your object:

<script type=\"text/javascript\">
if (document.all) {
document.getElementById(YOURIDHERE).onclick = foo;
}
</script>

This code works great in IE but doesn't in Firefox. It took me a long time to figure out why but it's due to the document.all like. Firefox doesn't support document.all. If you see that somewhere and like supporting firefox users then don't use it. That's all for now.

No comments:

Post a Comment