Wednesday, June 13, 2007 2:26 AM
Beware of the greedy Script element
I've seen this problem a few times now, from a few different developers... including myself. I figure it must have plagued someone else out there too, so hopefully if you read this, if you ever encounter this problem, it wont cost you hours.
It's a hell of a problem to track down because when you run into it, it causes really strange errors. Your entire page seems to fall off the edge of a cliff. That isn't far from the truth. But you could spend hours looking at the HTML and see nothing wrong with it!
Try this -- copy this into a static HTML file and open it in IE:
What do you get? This...
Hmmmm, that's funny. Yes, I added the question mark. Not bad for free form. But notice you don't see the "Hi!!!" part.... if you still don't know why that is, I challenge you to figure it out before reading on.
... answer below ...
Change your script tag like so, and problem solved:
Appears to only be an IE thing -- works fine in FF, Safari (including for Safari Windows), and Opera.
Filed under: AJAX, IE, Atlas, HTML