textarea

R

roN

Hi, How do I access the entered text in a text area, following is not
working: document.Formular.input1.value :(
Thank you!
 
L

Lee

roN said:
Hi, How do I access the entered text in a text area, following is not
working: document.Formular.input1.value :(
Thank you!

<html>
<head>
<script type="text/javascript">
function showValue() {
alert(document.Formular.input1.value);
}
</script>
</head>
<body>
<form name="Formular">
<textarea name="input1">Sample text</textarea>
<br>
<input type="button" value="Show Value" onclick="showValue()">
</form>
</body>
</html>
 
R

roN

Lee said:
roN said:

<html>
<head>
<script type="text/javascript">
function showValue() {
alert(document.Formular.input1.value);
}
</script>
</head>
<body>
<form name="Formular">
<textarea name="input1">Sample text</textarea>
<br>
<input type="button" value="Show Value" onclick="showValue()">
</form>
</body>
</html>

Hm, I try to go like:
[JS]
if (document.Formular.comments.value == "")
{
alert("Please enter some comments or questions!");
document.Formular.comments.focus();
return false;
}
[/JS]
over this:
HTML:
<tr>
<td width="22%" align="right" class="text">Comments/<br>Questions:<br><br>
chars left: <span id="charsleft"></span></td>
<td valign="top" width="78%" class="text"><textarea name="comments"
onkeyup="count(event)" rows="8" cols="40" class="flat"></textarea></td>
</tr>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top