easy textbox question

C

C_Kubie

This is a total newbie question...
<textarea rows="30" cols="50" name="MyText" title="Title"></textarea>

How do I read the contents of the textbox?
 
H

Hal Rosser

C_Kubie said:
This is a total newbie question...
<textarea rows="30" cols="50" name="MyText" title="Title"></textarea>

How do I read the contents of the textbox?

You may have java confused with javascript.
In javascript you could refer to the value property of the textarea.
You did not say what the name of the form is - where the textarea lives.
Assuming only one form:
alert (document.forms[0].elements['Title'].value);
=== (Or are you talking about server-side programs)===
if you're talking about java servlets look at doGet of HttpServlet class
and request.getParameter("Title")
 
V

Venkatesh

The tag u have put, I'm assuming is in some html page. Given that,
where do u want to read the contents of textarea ???? Do u want to read
inside a java program running on webserver? or just read within the
browser, when some event happens?

-Venkatesh
 

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

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top