CalmSoul
asked on
How to display clicked URL in div tag ?
I have a simple php template code ... which I got from following website
http://www.codewalkers.com/c/a/Display-Tutorials/Writing-a-Template-System-in-PHP/
in submenu I want to put the links but they are opening in the new windows or on the same window
i want them to open in {menu} div tag ....
regards,
http://www.codewalkers.com/c/a/Display-Tutorials/Writing-a-Template-System-in-PHP/
in submenu I want to put the links but they are opening in the new windows or on the same window
i want them to open in {menu} div tag ....
regards,
and alter these lines (i guess)
<a href="link1.php" id="menuItem1">link 1</a>
<a href="link2.php" id="menuItem2">link 2</a>
<a href="link3.php" id="menuItem3">link 3</a>
<a href="link4.php" id="menuItem4">link 4</a>
to something like
<a href="link1.php" onclick="javascript:docume nt.getElem entById('m y_iframe') .src='link 1.php'" id="menuItem1">link 1</a>
and give the id of iframe as my_iframe
<div id="iframe_div">
<iframe id="my_iframe" src="" width="500" height="500"></iframe>
</div>
<a href="link1.php" id="menuItem1">link 1</a>
<a href="link2.php" id="menuItem2">link 2</a>
<a href="link3.php" id="menuItem3">link 3</a>
<a href="link4.php" id="menuItem4">link 4</a>
to something like
<a href="link1.php" onclick="javascript:docume
and give the id of iframe as my_iframe
<div id="iframe_div">
<iframe id="my_iframe" src="" width="500" height="500"></iframe>
</div>
ASKER
where should i put this
<div id="iframe_div">
<iframe id="my_iframe" src="" width="500" height="500"></iframe>
</div>
in which file?
<div id="iframe_div">
<iframe id="my_iframe" src="" width="500" height="500"></iframe>
</div>
in which file?
put that in your master file, the file which shows all contents
ASKER
when I click on the link it is still not showing page in the iframe code attached
main.html
<div id="iframe_div">
<iframe id="my_iframe" src="" width="500" height="500"></iframe>
</div>
submenu.html
<li>
<a href="addCricketMatch.php" onclick="javascript:document.getElementById('my_iframe').src='addCricketMatch.php'" id="menuItem1">Add Cricket Match(s)</a>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
eg:
<div id="iframe_div">
<iframe src="" width="500" height="500"></iframe>
</div>