Iframe trouble
Iframe trouble
I am currently working on a reciept site for a friend of mine, where i use PHPWCMS for the reciept pages.
http://www.unghanen.dk/index2.html
as you can see i used an iframe since my friend wanted that. now click on "Opskrifter" and then click on any of the links in that menu inside the iframe.
See my problem? it jumps out of the iframe, and i don't want that.
http://www.unghanen.dk/index2.html
as you can see i used an iframe since my friend wanted that. now click on "Opskrifter" and then click on any of the links in that menu inside the iframe.
See my problem? it jumps out of the iframe, and i don't want that.
why use iframe?
just make your menu in the header.. as I see there is no point in usning iframe...
just make your menu in the header.. as I see there is no point in usning iframe...
http://www.studmed.dk Portal for doctors and medical students in Denmark
-
- Posts: 191
- Joined: Sun 9. Nov 2003, 00:18
- Location: Austin, TX
Re: Iframe trouble
In your example, I would suggest using {PHP:my_external.php}Reo-X wrote:I am currently working on a reciept site for a friend of mine, where i use PHPWCMS for the reciept pages.
http://www.unghanen.dk/index2.html
as you can see i used an iframe since my friend wanted that. now click on "Opskrifter" and then click on any of the links in that menu inside the iframe.
See my problem? it jumps out of the iframe, and i don't want that.
-
- Posts: 191
- Joined: Sun 9. Nov 2003, 00:18
- Location: Austin, TX
in the links you have use (target="_self")
change
to
to see if that solves your problem.
change
Code: Select all
<li><a href="index.php?id=1,0,0,1,0,0" target="_top">Gråsten Landkylling med citron og enebær</a></li>
Code: Select all
<li><a href="index.php?id=1,0,0,1,0,0" target="_self">Gråsten Landkylling med citron og enebær</a></li>
i found this in the content.func.inc.php file under include/inc_front/
but i don't understand anything of it, if anyone here could help me make it work inside an iframe?
Code: Select all
// List based navigation with Top Level - default settings
if( ! ( strpos($content["all"],'{NAV_LIST_TOP')===false ) ) {
$content["all"] = str_replace('{NAV_LIST_TOP}', css_list_top($content["struct"],$content["cat_path"]), $content["all"]); //content
// creates a list styled top nav menu, + optional Home | {NAV_LIST_TOP:home_name:class_name} | default class name = list_top
$content["all"] = preg_replace('/\{NAV_LIST_TOP:(.*?):(.*?)\}/e', 'css_list_top($content["struct"],$content["cat_path"], "$1", "$2")', $content["all"]);
}
Re: Iframe trouble
I still not understand why you HAVE to use iframe? if you want to use something like that then why not make aReo-X wrote:I am currently working on a reciept site for a friend of mine, where i use PHPWCMS for the reciept pages.
http://www.unghanen.dk/index2.html
as you can see i used an iframe since my friend wanted that. now click on "Opskrifter" and then click on any of the links in that menu inside the iframe.
See my problem? it jumps out of the iframe, and i don't want that.
Code: Select all
<DIV id=Layer1 style="Z-INDEX: 1; OVERFLOW: auto; WIDTH: 490px; SCROLLBAR-BASE-COLOR: #ffffff; HEIGHT: 335px">
the only problem is the print function but there must be a way to fix that?
http://www.studmed.dk Portal for doctors and medical students in Denmark
Re: Iframe trouble
I noticed that your iframe is not resizing to the size of the content. You can fix this by using something like this:Reo-X wrote:I am currently working on a reciept site for a friend of mine, where i use PHPWCMS for the reciept pages.
http://www.unghanen.dk/index2.html
Code: Select all
<script language="JavaScript">
function iFrameHeight() {
if(document.getElementById && !(document.all)) {
h =
document.getElementById('iframename').contentDocument.body.scrollH
eight;
document.getElementById('iframename').style.height = h;
}
else if(document.all) {
h = document.frames('iframename').document.body.scrollHeight;
document.all.iframename.style.height = h;
}
}
</script>
<iframe onLoad="iFrameHeight();" src="forum/index.php" scrolling="no"
scroll="auto" id="iframename" marginwidth="0" marginheight="0"
frameborder="0" style="width:100%;" height=600></iframe>