disable text area?

They have: 5,633 posts

Joined: Jan 1970

can i check if i can disable the text entered by the user in a text area? hmm....let me give u an example of it. after the user has entered some text in the text area, i would like to disable the text in the text box.
so that the user can only view the text n cannot modify anything in the text area. but i would like it to be done in HTML format, or do u have a way to get it done?

They have: 5,633 posts

Joined: Jan 1970

As far as I know you can always modify what is written in a text area. What you can do, using JavaScript, is write the text from the text area to a page with something like this:

<html>
<head>
<script language="JavaScript">
<!--
function writeText()
{
document.write(document.formname.textareaname.value)
}
//-->
</script>
<title>Title</title>
</head>
<body>
<form name="formname">
<textarea name="textareaname" rows="10" cols="60"></textarea>
<input type="button" value="Click Me" onClick=writeText()>
</form>
</body>
</html>

This will show what the user wrote on the page and they can't change it.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.