[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Set Textarea value not working

Posted on 2006-04-07
3
Medium Priority
?
1,048 Views
Last Modified: 2008-02-01
<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
Comment
Question by:icfire
  • 2
3 Comments
 
LVL 2

Author Comment

by:icfire
ID: 16402189
Just so you know cbxCategory has more than just the 1 option its options get filled based on another comboBox.

Thanks
0
 
LVL 1

Accepted Solution

by:
JeremyGStein2 earned 2000 total points
ID: 16402226
This line:
 document.frmNew.txtDescription.Value=myString;

Should have a lower case 'v' in value like this:
 document.frmNew.txtDescription.value=myString;
0
 
LVL 2

Author Comment

by:icfire
ID: 16402250
This is why I am not a javascript guy!

Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question