
Hi I have already posted this question but realised I had made a few mistakes. So firstly the problem again!.
I have a textarea box for user comments which will return what ever they have typed to the same page used to enter it on. However it has no code to check for existing comments and overwrites the original comment. Here is the code:
<html>
<head>
<script type="text/javascript">
function showComment(){ var data=document.getElementById("text").value;
alert(data);
document.getElementById("comment").style.visibility= "visible";
document.getElementById("lab").innerHTML=data;
}
</script>
</head>
<body>Post Comment: <br><textarea id="text" rows="10" cols="40"></textarea><br>
<label id="comment" style="visibility:hidden"><b>Comments: </b>
</label>
<label id="lab">Comments</label><br>
<input type="button" value="Post" onclick="showComment();">
</body>
</html>
Please could you channge the code so it will create a new line with the new text every time the user clicks on comments.
Kind regards.
Colin.