Iframe trouble

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Reo-X
Posts: 17
Joined: Sat 6. Dec 2003, 19:11
Location: Denmark
Contact:

Iframe trouble

Post 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.
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

why use 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
Bijan Hemati
Posts: 191
Joined: Sun 9. Nov 2003, 00:18
Location: Austin, TX

Re: Iframe trouble

Post 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}
Reo-X
Posts: 17
Joined: Sat 6. Dec 2003, 19:11
Location: Denmark
Contact:

Post 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.
Bijan Hemati
Posts: 191
Joined: Sun 9. Nov 2003, 00:18
Location: Austin, TX

Post 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.
Reo-X
Posts: 17
Joined: Sat 6. Dec 2003, 19:11
Location: Denmark
Contact:

Post 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
Reo-X
Posts: 17
Joined: Sat 6. Dec 2003, 19:11
Location: Denmark
Contact:

Post 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?
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Re: Iframe trouble

Post 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?
http://www.studmed.dk Portal for doctors and medical students in Denmark
Reo-X
Posts: 17
Joined: Sat 6. Dec 2003, 19:11
Location: Denmark
Contact:

Post 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
colech
Posts: 178
Joined: Thu 25. Mar 2004, 01:01
Location: Washington, USA
Contact:

Re: Iframe trouble

Post 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>
Post Reply