PDA

View Full Version : iframe's: slightly complex, need help



deymeraff
07 Jun 2007, 11:09 PM
Ok, i'm developing an e-commerce website. it has multiple categories, and each category loads a search option in an iframe. the iframe consists of 2 things, the category's image(pet supplies, clothes, funiture, etc) and a search bar that loads the searched keyword in another iframe within the iframe!

So... i have a vortex of iframes going on. Now... as some of you might know, you can adjust the width of an iframe to 100%, but not the height... so i had to find a javascript to allow the iframe to adjust the height to 100% of the content within it. the code works just fine... for the first iframe (the iframe that loads nothing but the category image and the search bar form), but when i load the iframe within the iframe, the height adjustments do not take place unless i manually press the "refresh" button on my internet explorer, firefox, avant, opera, etc...

just to clear up any possible future misunderstandings, when i search for a keyword, it triggers a javascript with an external source, so needless to say, some time needs to go by before I manually refresh the browser. I've already used java codes such as
self.parent.location.href = self.parent.location.href

the problem with these scripts is that they reload everything, including the original state of the iframe src="", which is blank! i just need to refresh everything, as in... i need the iframe src="" to stay the same when i refresh iframe1...

see, i know i don't really have to refresh the whole page to get iframe1 to readjust it's height, i just need to refresh iframe1 AFTER iframe2 has loaded the external java source... but as I said, the external javasource takes some time to load for some reason, even with a bandwidth connection.

If anyone can help me out with this, I would greatly appreciate it. Prefferably, I would like to refresh iframe1 only to resize it's height to 100%, but if there is a simple little command that will just refresh all content, while keeping the src="" for iframe1 and iframe2... then that would be fine too!

i would appreciate any help regarding these issues...

thank you,
-dan