PDA

View Full Version : Script: ajax.js and MSIE 6 Windows-loading external pages



glindsay
05-05-2006, 02:16 AM
Script: ajax.js Dynamic loading of external pages

I am operating on MacOSX 10.4.6 using Dreamweaver 7.1 and hand-coding to update our website (the test site can be seen at http://www.stmarksntc.org.au/St_Marks_2006/ )

I am using the ajax script to load external pages (within the home domain) into a main layer (called 'colleft') of default pages for each section. Mozilla-based browsers have handled this well as have most Mac browsers except IE5.2.

My biggest problem seems to be with MSIE 6 for Windows. It loads the external pages into the div but cuts off anything below the bottom of the screen. It fails to allow the user to scroll down the page.

I cannot figure whether this is a settings issue for MSIE 6 or a script issue or something simple in the code that I have missed. It could be a page coding issue. I have tried to eliminate all of these but a solution defies me.

I am new to dhtml and Dynamic Drive scripts so I would appreciate any suggestions, comments or pointers.

jscheuer1
05-05-2006, 05:15 AM
Because your page uses domain specific content, it would be hard for me to construct a local demo. However, these two styles:


html{
height: 100%;
border: 0;
padding: 0;
margin: 0;
}
body {
height: 100%;
margin: 0;
padding: 0;
border: 0;
background-color: #FFFFFF;

with their height: 100% set could be a part of the problem. It is usually not required to set either the body or the html elements' height, the page will fill out the space it needs. Except, I see you are using a lot of position:absolute and some float on your page, these take an element out of the flow of the document, not adding to its dimensions. This may be why you used height:100% to begin with. Using less or no position:absolute and floats would solve this. You could also try an IE6 specific way of styling:


* html{
height: auto;
overflow-y:scroll;
}
* html body {
height: auto;
}

Add those definitions below your current ones, they will only affect IE.

The overflow-y is IE specific anyway and may need to be applied to the * html body as well or the * html body alone. Also, instead of 'auto' you can try blank:


height:;

glindsay
05-05-2006, 07:10 AM
Thanks for having a look, John. I will give your suggestions a run. I actually was concerned about the height=100% and tried the pages without it but no deal. I haven't tried the MSIE specific fix yet.

glindsay
05-05-2006, 07:35 AM
Just to let you know I have a solution that works for MSIE 6 for Windows now.

I have put in the MSIE specific fix you offered and I have removed all height=100% and height=auto code from all divs.

You can't remove the position:absolute code from the CSS because the page goes haywire.

Now to check that it all still works in other browsers.

Thanks for the pointers!