Switch to full style
HTML,DHTML,Javascript,XML,CSS
Post a reply

Java- Copy text area into disabled text area

Thu Jun 09, 2011 1:39 pm

<tr>
<td align="right" valign="center" width="100" height="50"><B> Name:</B></td>
<td valign="center"><input type="text" name="userName" size="30" maxlength="26"></td>
<td valign="center"><input type="text" name="userName"size="30" maxlength="26" disabled></td>

How do I copy the name inputed in the text field- automatically into the disabled area.
For example, I'm typing "Sarah" in the text field, and I want it to say "SaraH" in teh disabled- read only field- on the form.

How do I do this?
What function would enable me to do this?
Please reply ASAP! i really need help= as this is a part of my assignemnt!
thank you



Re: Java- Copy text area into disabled text area

Thu Jun 09, 2011 3:38 pm

you can use javascript :

for example
Code:

<HTML>
<
HEAD>
<
SCRIPT LANGUAGE="JavaScript">
<!-- 
Beginning of JavaScript -
function 
myfunction () {
document.getElementById('mytest').value' your message ';
// do something. 
}
// - End of JavaScript - -->
</SCRIPT>
</HEAD>
<BODY>
 
 <TEXTAREA id="mytest" />
<INPUT id="text" TYPE="text"   VALUE="Change me"  onchange="myfunction()">
 
</BODY>
</HTML>


Post a reply
  Related Posts  to : Java- Copy text area into disabled text area
 Two Listeners- Mutli- Action Listeners on Text Area     -  
 Able to Copy Text from Uneditable Text Boxes(JTextfields)     -  
 Area clipping     -  
 compute area of the circle.     -  
 Calculate the area of a circle of given radius     -  
 play a sound when the user enters the area- audio feedback     -  
 Text to speech in java     -  
 Text Texture in java     -  
 draw text effects in java     -  
 java Break Line for text     -