Either I am searching wrong, or I simply can’t find the answer.
I want to make a simple Chat application using JSP. I want to take text from one field (input) and append it into the big text area (output) and then clear the text field (input) and refresh the page. Each entry should be on it’s own line.
Coming from Java this seems very confusing, and I’ve been at it for quite some time now to try and figure it out. Could you help me please?
<html>
<head>
<script>
function send() {
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Simple Chat</title>
</head>
<body>
<h1>Simple Chat</h1>
<textarea rows="30" cols="100" name="output">Welcome to the Chat!</textarea>
<form name="input">
<input type="text" name="input">
<input type="button" name="sendBtn" value="Send" onClick="send()">
<input type="button" name="refreshBtn" value="Refresh" onClick="location.href='chat.jsp'">
</form>
</body>
</html>
1 Answer