Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
05-07-2009, 08:24 AM #1
- Join Date
- Apr 2008
- Thanked 0 Times in 0 Posts
CSS Styles not applying on AJAX-loaded content IE7
I've got an issue where I'm replacing a portion of my page with AJAX, and the content of the loaded page is also being refreshed onTimeout every 1 second (it's a scan of sorts, and a number is being increased so it's refreshed every second to display the new #)
The issue is that in IE7 (only. It works perfect in FF, Safari of course), while the onTimeout keeps firing, the CSS styles are not being applied to the content.
However, when the scanning is done, and all pages are found, the onTimeout stops firing, and it then will apply the stylesheet upon the last final rendering of the page's content.
Again this is only doing this in IE7.
Any ideas of why this may be happening? There is one or two styles inline, but 99% of it is using the normal main.css stylesheet, and there's a bit of <script> in there, but also 99% of that is external as well.
Any things to try would be great, or hopefully someone's run into this issue before??
05-08-2009, 03:49 PM #2
- Join Date
- Jun 2002
- Between DC and Baltimore In a Cave
- Thanked 94 Times in 88 Posts
hacky solution, but it might work
set the display to none and than back to what it should be
It will force a redraw, might or might not work.Code:myDiv.innerHTML = xhr.responseText; myDiv.style.display = "none"; myDiv.style.display = "";