Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I’m not experienced in php but am learning by examining code examples and practicing. I’m puzzled by the following and tried many hours to find a working solution with code that should be included in an iframe. The iframe is something that I added to include other (static) pages and which is working fine for my menu options. But by default it should load the code between the iframe tags, something I cannot get working. Using the include() option resulted in an error that the php file cannot be accessed directly (I copied the code between the iframe in a new php document and included it in the src= parameter) or variables are not inherited. When I include the first print statement (print ‘<table width=’.xwidth.’ etc ) in a variable $TARGETWINDOW only this part is executed. Since I can only include one file/variable are succesive statements not included.
Another issue is that the variables are not inherited by the iframe, which is normal behavior according to the forums. I’m just wondering how I can make these visible to the content in the iframe other then including them in a general var.php file.
The code below is an extract of the involved code; I removed the three print statements (in red) between the iframe tags when I tried to put parts in variables or php files. They are listed to show you an example of the code.Code: Select all
print '<iframe name=inline scroll=no src='.$TARGETWINDOW.' frameborder=1 width='.$xwidth.' height='.$yheight.'>';
print '<table width='.$xwidth.' height='.$yheight.' style="background: url('.$path.'load_'.$language.'.gif) no-repeat;background-position: center">';
print '<tr><td><map name="google_'.$myval[unid].'">'; @include(images/image_'.$myval['unid'].'.htm');
print ' </map>';
print '</iframe>';Thanks in advance,
Michael
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]