DIV content reload
Hi!
Does anyone know a way how to reload a new content into one div container, whereby the rest of the page stays the same, without having to reload the whole page? This is the code I'm using now:
<script type="text/javascript">
<!--
function replaceContent(show) {
var display = new Array();
display[1] = "Some new content.";
display[2] = "Some other content.";
display[3] = "Some more content.";
document.getElementById("my_div").innerHTML = display[show];
}
-->
</script>
...
<a href="#" onclick="replaceContent(1)">more1...</a>
<a href="#" onclick="replaceContent(2)">more2...</a>
<a href="#" onclick="replaceContent(3)">more3...</a>
<div id="my_div"></div>
<a href="#" onclick="replaceContent(1)">more1...</a>
This code works for reloading, but doesn't let me use text properties which I need in the reloaded content (like bold fonts or different colour). Does anyone know how to get about it?
Have a look. It's the left side window frofi.co.uk/new/index.htm
Raise And Share a Million.com - Rewarding to those who like to help others