Page 1 of 1

Problem with iframe-integration of an external php-script

Posted: Wed 26. Apr 2006, 17:47
by charliespeed
Hi all.

I've integrated an external php-Script within my site by using the iframe-solution:

Code: Select all

<script type="text/javascript">
function iFrameHeight() {
if(document.getElementById && !(document.all)) {
theFrame = document.getElementById('iframename');
h = theFrame.contentDocument.body.scrollHeight;
theFrame.style.height = h+15;
}else if(document.all) {
h = window.frames.iframename.document.body.scrollHeight;
document.all.iframename.style.height = h+15;
}
}
</script>
See it here: http://www.hebamme-in-hamburg.de/cms/in ... elle_kurse

Everything works fine for the 'first' page. But when you click a link to the details page of any training, the iframe doesn't recalculate it's height (of course?). So you end in a grey area and have to scroll upwards first before you see the information... :?

(try it yourself: click the "Informationen & Anmeldung" link for any item near the end of the page (e.g. GV-13/06)).

Since i'm not very experienced with javascript, can anyone help pls?

Thanks so far
Gunnar

Posted: Wed 26. Apr 2006, 18:14
by pico
Hi

maybe try this Script http://www.hdk-online.de/iframe.phtml

Posted: Wed 26. Apr 2006, 18:44
by charliespeed
very nice, but now a get scrollbar (within the iframe, not he page) :?: and only a part of the content is visible, not the whole list. this worked better with the old script. is there any solution to get rid of the scrollbars and display the whole list, with the content area being extended?

the result of the operation is still online:

http://www.hebamme-in-hamburg.de/cms/in ... elle_kurse