Inline CSS and Ajax Issue with IE
IE Got Me Again
After spending more time than I care to say troubleshooting a CSS issue with IE7, I thought I'd share the details here in case it saves anybody else some time later down the road.
The Scenario...
I have an application that updates the contents of one of its divs using an ajax call that returns html. Within that retrieved html is a style block (<style>...</style>) defining how I want my table headers (<th>...also contained within the retrieved html) to appear.
IN A NUTSHELL: IE7 does not recognize inline styles that were retrieved via an ajax call.
Perhaps this is a "duh" item to some of you who already knew it, but since my beloved FIREFOX accepted them just fine, it didn't occur to me until I had tried every other possible iteration and syntax to move the styles out of my retrieved html and into my app's global CSS template, which (by the way), is the solution to this issue.
Hope this saves someone else some time and emotional pain.
The Scenario...
I have an application that updates the contents of one of its divs using an ajax call that returns html. Within that retrieved html is a style block (<style>...</style>) defining how I want my table headers (<th>...also contained within the retrieved html) to appear.
IN A NUTSHELL: IE7 does not recognize inline styles that were retrieved via an ajax call.
Perhaps this is a "duh" item to some of you who already knew it, but since my beloved FIREFOX accepted them just fine, it didn't occur to me until I had tried every other possible iteration and syntax to move the styles out of my retrieved html and into my app's global CSS template, which (by the way), is the solution to this issue.
Hope this saves someone else some time and emotional pain.
Subscription Options
You are not logged in, so your subscription status for this entry is unknown. You can login or register here.
Re: Inline CSS and Ajax Issue with IE
This seems like a crazy bug to me. I am surprised that this happens. Why can't everything be a bit more like FireFox :)
Posted by Ben Nadel on May 14, 2008 at 11:50 AM
Re: Inline CSS and Ajax Issue with IE
Oh My God! Thank YOU!!! I can't believe I found this little bit of info - which has indeed saved me hours of futile cursing at IE and the 2 brain-celled idiots that work there.
Many thanks for the tip :-)
Many thanks for the tip :-)
Posted by whimZefx on May 18, 2008 at 7:09 AM
Re: Inline CSS and Ajax Issue with IE
Glad it saved someone else some headache and hair pulling, WhimZefx. :) That's EXACTLY why we should all share the things we learn. ;)
Posted by dougboude on May 18, 2008 at 3:34 PM