| Here's the solution
<div id="mydiv">
text that will change
</div>
<script language="javascript">
function changetext(newtext){
document.getElementById('mydiv').innerHTML = newtext
}
</script>
You have the div with it's own id and the function that changes the text. now you only have to use that function applied in a button, a link, etc. passing the new text as a parameter.
hope it helps. |