Page 1 of 1

Iframe trouble

Posted: Fri 26. Dec 2003, 18:22
by Reo-X
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.

Posted: Fri 26. Dec 2003, 19:29
by frold
why use iframe?

just make your menu in the header.. as I see there is no point in usning iframe...

Re: Iframe trouble

Posted: Fri 26. Dec 2003, 19:38
by Bijan Hemati
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.
In your example, I would suggest using {PHP:my_external.php}

Posted: Fri 26. Dec 2003, 20:23
by Reo-X
well, the page with the iframe doesn't use the phpwcms, only the content inside the iframe under "Opskrifter" uses it, so i don't see how i could get that tag to work with that.

Posted: Fri 26. Dec 2003, 21:45
by Bijan Hemati
in the links you have use (target="_self")
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>
to

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>
to see if that solves your problem.

Posted: Fri 26. Dec 2003, 22:31
by Reo-X
how do i change that when i used this:

{NAV_LIST_TOP::list_class}

that is all i have in that article, every reciept is placed on different pages

Posted: Sat 27. Dec 2003, 00:40
by Reo-X
i found this in the content.func.inc.php file under include/inc_front/

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"]);
}
but i don't understand anything of it, if anyone here could help me make it work inside an iframe?

Re: Iframe trouble

Posted: Sat 27. Dec 2003, 11:54
by frold
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.
I still not understand why you HAVE to use iframe? if you want to use something like that then why not make a

Code: Select all

<DIV id=Layer1 style="Z-INDEX: 1; OVERFLOW: auto; WIDTH: 490px; SCROLLBAR-BASE-COLOR: #ffffff; HEIGHT: 335px">
like I have made here to test it http://www.instrukser.dk/index.php?id=8,0,0,1,0,0 it works perfect......

the only problem is the print function but there must be a way to fix that?

Posted: Sat 27. Dec 2003, 21:37
by Reo-X
yeah, well the print funktion is very important for the site.

Anyway, i solved the problem, simply made all the pages use phpwcms

Re: Iframe trouble

Posted: Fri 16. Apr 2004, 00:01
by colech
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
I noticed that your iframe is not resizing to the size of the content. You can fix this by using something like this:

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>