• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1052
  • Last Modified:

Set Textarea value not working

<SCRIPT language="JavaScript">
function chgText (what) {
 var myString="This is line one.\nThis is line two.\rThis is line three.";
 document.frmNew.txtDescription.Value=myString;
 }
</SCRIPT>

<FORM onsubmit="return submit_form()" action="caseNewPost.asp" method="POST" id=frmNew name=frmNew>

<TD>
  <SELECT id=cbxCategory name=cbxCategory style="WIDTH: 200px" onChange="chgText(this)">
    <OPTION  value="0" selected>(None)</OPTION></SELECT>
</TD>

<TD colspan=4><TEXTAREA id=txtDescription style="SCROLLBAR-SHADOW-COLOR: white; SCROLLBAR-TRACK-COLOR: white; WIDTH: 100%; HEIGHT: 140px" name="txtDescription"></TEXTAREA></TD>


Those are the relevant lines of code I am dealing with.  Can someone tell me why the textArea is not getting the value that I am sending to it?  I tried to put an alert in the function to make sure I was getting to the function and I was.  I changed the txtDescription in the function to a bogus entry and got an error.  But with this code I get no error and I get no result also.  Someone please help, I am ready to pull my hair out on this one.

Thanks!
0
icfire
Asked:
icfire
  • 2
1 Solution
 
icfireAuthor Commented:
Just so you know cbxCategory has more than just the 1 option its options get filled based on another comboBox.

Thanks
0
 
JeremyGStein2Commented:
This line:
 document.frmNew.txtDescription.Value=myString;

Should have a lower case 'v' in value like this:
 document.frmNew.txtDescription.value=myString;
0
 
icfireAuthor Commented:
This is why I am not a javascript guy!

Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now