-
simplified noteboard
Is there a script that pastes text below the textarea into the same HTML file. I want to create a simplified version of a message board.
<html>
<head>
<title></title>
</head>
<body>
<textarea name="message" cols=60 rows=15></textarea><BR>
<input type="submit">
</body>
</html>
-
i don't understand what you are asking. care to elaborate a little more?
-
REPLY
I wondered if there was some sort of script that pastes the text from the textarea into the same HTML file below this text area if I click the submit botton.
For example if fill "blablabla" into the text area and click the submit button then the text
"blablabla" has to appear below the text area. If now a second user fills something in for example "dfgdfhdfh" then this text will be pasted below "blablabla".
So what I actually want is create a messge board that works on the client side.
-
Hi,
Something like this?
Code:
<html>
<head>
<title>Untitled</title>
<script language="JavaScript" type="text/javascript">
<!--
function passValue(objectID){
// objectID = id/name of the message box
if (document.getElementById){
dom=document.getElementById;
}else{
dom=document.all;
}
dom('layer1').innerText=dom(objectID).value
}
//-->
</script>
</head>
<body>
<textarea id="message" cols=60 rows=15></textarea><br>
<input type="button" id="submit" value="Submit" onclick="passValue('message')"><br>
<div id="layer1"></div>
</body>
</html>
-
REPLY2
It looks great but is there also a way that the data will be saved. So if I am a visitor 1 and enter "dfhdf". Then someone else comes into my page and enters "ghgfnb". Then the third visitor sees:
"dfhdf".
"ghgfnb"
So I mean really a plain message board. I tried some PHP script from the internet but it didn't work. Probably because my webhosting company does not support PHP.
-
Not without a Server-Side language like PHP or ASP.
The only way you can "save" something side is through cookies but cookies are only stored on the clients PC so everyone accessing the site wouldn't be able to see the data.
-
Well, I think there's some sites where news posters enter a password and stuff then post their news but cant edit the actual coding. Is this PHP then?