Hi I had a similar requirement as below and was curious to know to fix the issue.
Below is the code
<script type="text/javascript">
function Msg1(){
  var sd= document.getElementById('myText').innerHTML = 'Thank's!';
  alert('-sd-'+sd);
}
function Msg2(){
  document.getElementById('myText').innerHTML = 'Try messages 1 again...';
}
</script>
<input type="button" onclick="Msg1()" value="Show Message 1" />
<input type="button"  onclick="Msg2()" value="Show Message 2" />
<p id="myText"></p> 
The innerHTML tag is throwing script error like
Webpage error details
Message: Expected ';'
Line: 29
Char: 64
Code: 0
URI: file:///C:/Documents%20and%20Settings/j1007962/Desktop/spl.html
I was looking for the fix around innerHTML or better replace with something which would fix
this . Thanks