Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-07-2009, 07:24 AM   PM User | #1
savingstrangers
New Coder

 
Join Date: Apr 2008
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
savingstrangers is an unknown quantity at this point
Internet Explorer CSS Styles not applying on AJAX-loaded content IE7

Hey there,

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??

Thanks!
savingstrangers is offline   Reply With Quote
Old 05-08-2009, 02:49 PM   PM User | #2
A1ien51
Senior Coder

 
A1ien51's Avatar
 
Join Date: Jun 2002
Location: Between DC and Baltimore In a Cave
Posts: 2,717
Thanks: 1
Thanked 94 Times in 88 Posts
A1ien51 will become famous soon enough
hacky solution, but it might work

set the display to none and than back to what it should be

Code:
myDiv.innerHTML = xhr.responseText;
myDiv.style.display = "none";
myDiv.style.display = "";
It will force a redraw, might or might not work.

Eric
__________________
Tech Author [Ajax In Action, JavaScript: Visual Blueprint]
A1ien51 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:27 PM.


Advertisement
Log in to turn off these ads.