PDA

View Full Version : Iframe SSI Script II -- Can't view in FF



Schmob
12-22-2005, 01:32 AM
Iframe SSI Script II
http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm

The problem is that the iframe shows up in IE, but not in firefox. It says it should though, on the script page. Why won't it show?

Here is the link to the page I am using it on:
http://schmob.50webs.com/index.html

Please view in IE first, then firefox. The iframe the script is on is the nav box to the left. Can anyone tell me why the iframe won't show up in firefox and how I can fix it? Thanks. ;)

jscheuer1
12-22-2005, 07:32 AM
It is hard to thoroughly test an installation like this because the support file (http://schmob.50webs.com/menuiframe.html) is on the server and must be used by the iframe but when testing the top page locally, that violates the security of the domain. Also, I really don't see any use of this script on your pages that an ordinary iframe, set to the proper attributes and dimensions couldn't replace. However, the main problem is that the iframe must have an id, not a name. Where you have:

<IFRAME name="inlineframe"

it should be:

<IFRAME id="inlineframe"

That may be all that it takes, except that you also need to use these original lines:


var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

instead of:


var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 500 //extra height in px to add to iframe in FireFox 1.0+ browsers

You should also revert to the original script anywhere else that you may have made modifications other than here:


//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["inlineframe"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="no"

Schmob
12-22-2005, 02:56 PM
Thank you thank you thank you! It worked the first time! (Finally, after 4 days of trying to figure it out) You've helped so much!