novartic Posted July 14, 2009 Author Share Posted July 14, 2009 Nope, Sorry, this does not work.else if(F.contentWindow) { F.height = F.contentWindow.document.documentElement.offsetHeight; } Link to comment Share on other sites More sharing options...
dsonesuk Posted July 14, 2009 Share Posted July 14, 2009 I've been trying this out, and it worked in browsers listed in comments. I don't have IE8 installed so if you could test it, this might be the way to go.<script type="text/javascript"><!--//function sizeFrame() { var F = document.getElementById("myFrame"); if(F.contentDocument) { F.height = F.contentDocument.documentElement.scrollHeight; //FF 3.0.11, Opera 9.63, and Chrome } else { //F.height = F.contentWindow.document.body.offsetHeight; //IE6, IE7 only F.height = F.contentWindow.document.body.scrollHeight; //IE6, IE7 and Chrome } } window.onload=sizeFrame; //--></script><iframe width="100%" id="myFrame" src="iframepage.htm" scrolling="no" frameborder="0"> Link to comment Share on other sites More sharing options...
novartic Posted July 14, 2009 Author Share Posted July 14, 2009 I tested this out on Chrome, FF, IE7Works perfect.Your a legged.scrollHeight hay.... intresting...All the Same, thank you very much for both of your help. Link to comment Share on other sites More sharing options...
novartic Posted July 16, 2009 Author Share Posted July 16, 2009 OK, Sixth Form | Parents Information pages now do not correctly expand. Link to comment Share on other sites More sharing options...
dsonesuk Posted July 16, 2009 Share Posted July 16, 2009 scrollbars in IE?try setting scrollbars to no, to see if fixes the problem. also the height in iframe might be cancelling out javascript height setting.if you require scrollbars for non javascript browsers, try setting the scrollbars to 'no' using javascript (think this can be done, sure it can) then non javascript will have scrollbars="auto" (with the height you have defined) by default. Link to comment Share on other sites More sharing options...
dsonesuk Posted July 16, 2009 Share Posted July 16, 2009 course there is.F.scrolling="no"; Link to comment Share on other sites More sharing options...
novartic Posted July 16, 2009 Author Share Posted July 16, 2009 Found that there were some odd things in the code that upset the JS. Its fixxed now. Though some other docs stil have this same issue so im just going to +30 at the end again. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.