I have one menu_1.php file, containing links to other pages. When such hyperlink is clicked I want that the content of those pages is shown in an iframe in index.php. This iframe must only be active when someone clicks on the link, otherwise it should not show the iframe but the default content in the else statement.
Code: Select all
print '<div id="menu">';
print '<ul>';
print ' <li><h2>Navigation</h2>';
print ' <ul>';
print ' <li><a href="http://mysite.com/otherpage.php?id=2" target="inline” onClick=setKey(1);return false">Menu item 1</a></li>';
….The code in index.php
Code: Select all
function setKey($Key_1) {
if (isset($Key_1)){
print '<iframe name=inline scroll=yes frameborder=1 width='.$xwidth.' height='.$yheight.'>';
print '</iframe>';
}
elseif (!isset($Key_1)){
print '<table width='.$xwidth.' height='.$yheight.' style="background: url('.$path.'load_'.$lang.'.gif) no-repeat;background-position:top center">';
…..
}
}Hope that there is someone to help me out with this…
Michael