Hello there. I'm Kristofer Baxter.

I’m a Web developer specializing in front-end development including XHTML, CSS, Javascript, and occasionally Flash.

My latest ramblings. We should chat.

January 2008 Archives

Internet Explorer and Operation Aborted (Part 1)View Post

Let's talk about a particularly nasty IE bug which can be easily tested, but when occurs can cause developers to go rummaging through potentially hundreds of lines of code looking for a needle in a haystack. IE 5.5, 6, and 7 all fall victim to the 'Operation Aborted' error which causes a page to completely hault loading and display an error message.

This 'Operation Aborted' bug is caused, according to Microsoft, because:

“a child container HTML element contains script code that tries to modify the parent container element of the child container.”

This means that IE doesn't want to allow you to modify an element's parent if it hasnt been fully loaded. This makes sense - it would be hard to access an element that isn't yet fully loaded. I would insert a joke or two about how every other modern web browser can do this correctly; but lets just focus on a solution for those people using IE.

So, how do we solve this problem

First, lets make an example case where the error occurs due to changing innerHTML before IE is ready for it, and one where we append a childNode before IE is ready.

Second, lets try using a popular Javascript framework's domready command to initiate the insertions.

And third, lets try a basic insertion of the script following the elements which caused it.

Conclusion

Both the use of the domready command and placing the script outside of the element it was trying to access worked. This gives us three possible options for tackling this problem:

  1. Use a domready function to activate your scripts.
    I think this is something that is a given anyway with most modern scripting, but its not the only solution (and as I'll show in my next post it doesn't solve the complicated cases of this problem).
  2. Be sure your script accesses elements after those elements have been closed.
    This is the easiest solution, and a great reason why inline scripts really belong at the end of a xhtml document.
  3. Use a onload function on the window object to activate your scripts.
    This is the fallback solution for cases which are not fixed by the first option, and in my next post I'll show an example of why this is necessary and how to implement it.

Continue reading

Flipping the SwitchView Post

For better or worse, I've decided to turn on my new site with known problems.

Q: Why would I do this?
A: My personal site can have bugs, they give me things I can blog about how to fix.

Here is a short list of broken items, in no order, I'll be attending to in the next few days:

And here are some longer term things that need to be done:

Nevertheless, even with a large list of todos, I think the site works pretty well.

Continue reading

Ramble, Ramble, RambleView Post

For years my co-workers have told me that I needed to start a weblog; a place where I could write down the solutions I come up with for the problems I have encountered as a web developer.

I put making that weblog as a last priority for far too long...

So, last week, when I started work on this revision of my personal website I ran into a issue where I couldn't remember how to solve a problem that I had encountered before. (Specifically, this). That was the kick that made me realize I should have made this weblog a long time ago.

I've decided to call this weblog Ramblings, because that's exactly what it will consist of. You can expect to find posts about solutions for front end web development and their root causes. Short and sweet, most of the entries will not take long to read (unless the comments on them begin to pile up).

Continue reading

Main Index | Archives | April 2008 »
Checking your system to see if you have Myriad or Myriad Pro installed. You shouldn’t see this again if you have cookies enabled for 100 days.