View Single Post
  #2  
Old January 5th, 2005, 09:50 PM
agusgriego agusgriego is offline
Partially Insane
 
Join Date: Oct 2001
Location: Buenos Aires, Argentina
Posts: 117
Thanks: 0
Thanked 0 Times in 0 Posts
agusgriego is on a distinguished road
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.
Reply With Quote