kaijunexus
17 Feb 2011, 06:54 PM
I have a website divided into two content areas. One is a list of links. In the other, I want to dynamically load an html or php file based on what link is pressed.
I tried to do so using something like
<a href="#self" onclick="document.getElementById('content').innerHTML = '<!--#include file="file.shtml" -->';">link</a>
<a href="#self" onclick="document.getElementById('content').innerHTML = '<!--#include file="file.php" -->';">link2</a>
<div id='content'>
</div>
However, the files load onto the page before anything is clicked and do so within the link codes themselves. Should I not be using SSI for this? Please help?
I tried to do so using something like
<a href="#self" onclick="document.getElementById('content').innerHTML = '<!--#include file="file.shtml" -->';">link</a>
<a href="#self" onclick="document.getElementById('content').innerHTML = '<!--#include file="file.php" -->';">link2</a>
<div id='content'>
</div>
However, the files load onto the page before anything is clicked and do so within the link codes themselves. Should I not be using SSI for this? Please help?