PDA

View Full Version : Dynamic Ajax Content invisible in IE8



yeahdesign
03-02-2010, 03:21 AM
1) Script Title: Dynamic Ajax Content

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

3) Describe problem: I'm using Ajax to dynamically load a simple news page into a div on each page. I works in every single browser on Mac and PC except for IE8, it even works in IE7 (haven't looked at IE6 and have no intention of doing so). When I check generated source code it shows that the external page is loading but it cannot be seen in the browser.

Page is at http://www.extralesson.com/test/ (yes i know the coding is not great, I built the site a loooong time ago when I was only just starting to experiment with CSS).

Page being loaded is at http://www.extralesson.com/test/news.html

Javascript is at http://www.extralesson.com/test/scripts/newsload.js

The javascript is called in the onload ajaxpage('news.html', 'Layer1'); return false of the body tag.

CSS for the div is:

#Layer1 {
position:absolute;
left:10px;
top:229px;
width:138;
height:271px;
z-index:99;
visibility: visible;
overflow:visible;
display:inline;
}

I tried display:block; in the CSS as well.

Hope someone can help!

Andy.

yeahdesign
03-02-2010, 05:08 AM
I worked out what it was. If you're interested: it was the <!DOCTYPE...> tag in the page being loaded, as soon as I got rid of that it worked.

Thanks to: http://ajaxcontroltoolkit.codeplex.com/WorkItem/View.aspx?WorkItemId=23388 Note that if the DOCTYPE tag is critical to your site, this workaround won't work.

Andy.