|
I was reading this topic and this sounded like the perfect solution to a problem I was experiencing, however, I ran into a brain freeze trying to expand on it.
I added the script as you stated and added a $content1 and $content2 variables to it that would contain the 'home page' content like so:
<script>
$content[1] = "This is a test.";
$content[2] = "This is another test.";
function ChangeContent(type){
var x=document.getElementById("mainContent");
x.innerHTML=$content[type];
}
</script>
<a href="javascript:ChangeContent(2);"
onMouseover="window.status='Return to the Main Page';return true">Home</a><br>
How would I pass the proper $content[Number] to the script? I'm guessing I'm not using the arrays right, but not sure.
Thanks in advance!
|