View Full Version : in-line frames mod

09-10-2005, 05:43 PM
I use some of the DynamicDrive scripts but know ZERO about Java so if someone would be kind enough to respond to my query with this in mind I would be most thankful.

I use the following script on my site from the Dynamic Drive site: http://www.dynamicdrive.com/dynamicindex3/dropdownview.htm

This script opens a choice of URL'S to an in-line window. The in-line window is set to a specifc height only. What I would like to acheive is having the in-line window adjust automatically to the height of the varying opening pages.

I note there appears to be separate scripts on file that accomplish this such as: http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm

Can someone easily marry these 2 to attain the above goal? Please remember my java skills are limited to cut and paste. Many thanks to anyone who chooses to respond!

09-12-2005, 04:24 AM
First off, Java and javascript are two different things. Second, I have seen a number of problems with the second script you mention. It doesn't work with links to off site content. There are other cross-browser issues. So, since one would be limited to resizing the iframe for on site content only anyway, why not just resize the iframe using the known dimensions of your on site content? Additionally, things could still get weird if the page that the iframe is on would be distorted because of the iframe being resized. In light of all this, and because I generally like to see what is being attempted before I spend too much time coding for it, could you supply the code (or preferably a link to a page) of what you have so far. I am imagining you may have the first script at least set up with links to display your desired content in it. If you have that much, let's see it and work from there.

09-12-2005, 10:23 PM
Hi John,

Thanks for responding. This script: http://www.dynamicdrive.com/dynamicindex3/dropdownview.htm is presently installed here: www.sendmore.info but with this script the in-line frame dimensions are fixed but my linked pages of course vary in size. I find that some of my visitors don't know enough to scroll this in line frame so I hoped that the script could be modified to open to the actual size of the respective in-line page.

This alternate script seems to accomplish just that. http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm but does so via text links where I am wanting a drop down menu

So basically I guess I am hoping that either this script 'A' http://www.dynamicdrive.com/dynamicindex3/dropdownview.htm can be modified to adjust to the linked page size (from outside the I frame as presently) OR that this script 'B': http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm can be invoked with a drop down menu. (from outside the I frame)

Make sense?

Many thanks for looking at this, it is much appreciated.


09-13-2005, 01:56 AM
OK, well I cannot easily test this here because I would have to download all of your pages (remember what I said about not being able to use off site content). But, the two scripts seem compatible so, it should work. Add the Iframe SSI script II into the head as it tells you to and set the:

var iframeids=["external"]
Then, in the Drop-down Document Viewer script, find this line:

document.getElementById("external").src=selectedurlReplace it with this one:

loadintoIframe('external', selectedurl)