Friday, February 12, 2010

I finally figured out an easy way to post code samples. I spent way too much time trying to learn the intriquisies.

I finally figured out an easy way to post code samples. I spent way too much time trying to learn the intricacies of blogspot. This site: http://francois.schnell.free.fr/tools/BloggerPaste/BloggerPaste.html provides a simple way to convert.

So what I was trying to post before I fell down this rabbit hole was that I kept running into errors in IE that I was not seeing in Firefox. It was minor, but I really don’t want to have these errors. I know I see errors on Yahoo and other mainstream sites that get suppressed if you do not have error checking enabled, but I just didn’t want them. What I found was on this site: http://blog.roberthahn.ca/articles/2007/02/02/how-to-use-window-onload-the-right-way/

I won’t go into the details of why it works and why it necessary, but the final result was the way that I loaded the initial javascript code

<script>
function makeDoubleDelegate(function1, function2) {
return function() {
if (function1) function1();
if (function2) function2();
}
}
</script></head><body><script>
window.onload = makeDoubleDelegate(window.onload, Initialize );
</script>


This eliminated the errors, now back to working on a framework.

No comments:

Post a Comment