PDA

View Full Version : Need Help with the iFrame SSI Script



Ihmhi
06-25-2005, 08:18 AM
iframe SSI Script
http://www.dynamicdrive.com/dynamicindex17/iframessi.htm

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Hiya there. I signed up for the forums because I am having a bit of trouble with the current script on my homepage. I am testing it off-line at the moment. In Internet Explorer, the script behaves properly and displays the webpage that it is supposed to load. However, in Firefox 1.0+ (the browser I use most often), it shows the page in a much smaller box with both horizontal and vertical scroll bars. How do I fix it so Firefox shows the page properly?

I should state that I am employing a CGI script on my page, as well as a DD pop up script, but it is doubtful that either of these could be interfering with it. I think that there is an option or something that I have to config for Firefox that I may have overlooked.

The kicker is that I have copy and pasted the script exactly from Dynamic Drive, and the pop-up in the demo looks like it should. What I am missing here?

If you require any additional information, I will provide it. I appreciate any and all help.

jscheuer1
06-25-2005, 09:00 AM
I should state that I am employing a CGI script on my page, as well as a DD pop up script, but it is doubtful that either of these could be interfering with it. I think that there is an option or something that I have to config for Firefox that I may have overlooked.Only way to be sure is to remove these scripts and see. A doctype declaration (if any) may be causing problems too, as can small syntax errors. IE will overlook some things that FF will not. It can be as simple as not specifying px for pixels or something like that. I don't think it is your FF browser's settings, the only way I could disable the demo in FF was to turn off javascript altogether. Using FF with all the restrictions checked still allowed the demo script to work. If you are still having problems, put up a live demo for us to see or paste or attach your full source.

Ihmhi
06-25-2005, 09:09 AM
I had originally posted the source code, but I thought it better to just upload a copy of the page to my website that can not be accessed without directly typing in the link.

Test Page:
http://www.angelfire.com/nj4/ihmhi/home3.html

I did manage to find an element in the code that was related to Firefox:


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

I changed it thusly, so the iFrame on the right side would have enough length:


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

(I have bolded the portion of the code that I have changed in both instances of it that I have shown here.)

Now, however, some problems stille exist:


There is a horizontal scroller on the right side iFrame.
The bottom iFrame and the right side iFrame are apparantly subject to the same values, so although the right side iFrame has a generous amount of length, the left side iFrame extends the page too far at the bottom.


Since I have the feeling that I will not be able to have both iFrames in here, I was wondering if there was anything else I could do as a substitute? I want to use something similar so I can load the menu on the left (not yet implemented in this version), the menu on the right (iFrame "rightsidemenu"), and the menu on the bottom (iFrame "bottommenu"). By the time my updates are done, I will have nearly 30 pages on my website, and I am not going to make these updates without having a way to update my menus (on the left, right, and bottom) at the same time. I need this, otherwise making changes to my website will be far too difficult.

If you can not help me figure out how to make this work with the current script, than an alternative would be much appreciated. And please, assume my ignorance on the subject and go into as much detail as possible.

jscheuer1
06-25-2005, 04:51 PM
I've looked over the page and frankly, at least for the moment, I'm stumped too. This has come up before. If there is anything dynamic (appears that there is, scripts) about the page displayed in the iframe, this could be the trouble. No work around for FF has been found for this that I am aware of.

Ihmhi
06-25-2005, 07:59 PM
Saa... well, I was already expecting for it not to work out in the first place. Most of the scripts I have used on Dynamic Drive have had excellent cross browser compatablility. I suppose that, for the moment, I am going to have to resign myself to updating 30 pages a day.

Thankfully, I long ago worked out a system for this. I edit all of the files offline, and then upload them ten at a time through Angelfire's uploader. It is a lot faster than opening up each page in Angelfire's built-in editor.

In the meantime, I am going to poke around and see if I can find a Server Side Include (SSI) tutorial that I can read without going crosseyed. Thank you for all of your help.