F
Fredrick H
Guest
Here is the code that I have currently, but instead of writing to the page, I want it to change the code so that it will show up over the network when you refresh. Maybe not even change, just add to it. If it's possible, though can I have it so that after a certain amount of text is put into the HTML so that it will show up over the network that it will delete it so that there isn't an overload of text.
<html>
<head>
<script type="text/javascript">
function chatRoom(){
var text = document.getElementById("area").innerHTML += document.getElementById("message").value += " ";
document.getElementById("text").value;
}
</script>
<title>My Form</title>
</head>
<body onLoad="chatRoom()">
<form enctype="text/plain" target="area" onSubmit="chatRoom()">
<textarea id="message" name="message"></textarea>
<input type="submit" name="submit" id="submit" value="submit">
<button type="button" onClick="chatRoom()" value="Yourself" name="Yourself" id="Yourself">Yourself</button>
</form>
<div id="area">
<area id="text" value="nothing">
</div>
</body>
</html>
Any help appreciated, thanks.
<html>
<head>
<script type="text/javascript">
function chatRoom(){
var text = document.getElementById("area").innerHTML += document.getElementById("message").value += " ";
document.getElementById("text").value;
}
</script>
<title>My Form</title>
</head>
<body onLoad="chatRoom()">
<form enctype="text/plain" target="area" onSubmit="chatRoom()">
<textarea id="message" name="message"></textarea>
<input type="submit" name="submit" id="submit" value="submit">
<button type="button" onClick="chatRoom()" value="Yourself" name="Yourself" id="Yourself">Yourself</button>
</form>
<div id="area">
<area id="text" value="nothing">
</div>
</body>
</html>
Any help appreciated, thanks.