View Full Version : iFrame SSI problem

08-24-2010, 03:18 PM
1) Script Title: iFrame SSI Script II

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

3) Describe problem:
Hi guys!

Im really new to Java, and don't really master the code yet, but i'm using a bit of Java on my site with a script from you guys.

This script dynamically changes the height of my iframe that i have in my index.html. It works great, i'm using it on the menu, so that when i load a new page in the iframe, i don't get the scrollbars. This however is not the problem.

The problem is that when I try to open a document in the iframe with a link that's from a page in the iframe, nothing happens. I think this is because the script is looking for the frame in the document the link is in, but the frame actually is in the index.html file. I've got the script in both the index.html head and the head of the file that's in my iframe. My knowledge of java isn't so great, so i don't know how to modify the code to locate the iframe correctly.

To make it more clear ill make an example:
index.html got an iframe named 'mainframe'
on the index.html page, there's a link that loads test.html into 'mainframe'
using the script to automatically change the height of 'mainframe' to match the content of test.html. This works great.
on the test.html page, there's a link that loads apple.html into 'mainframe' trying to use the same script. However, nothing happens.

Ik hope you guys get this, and can help me out here!
Thanks in advance,