Set Textarea value not working

Posted on 2006-04-07
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.";

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

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

<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.

Question by:icfire
    LVL 2

    Author Comment

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

    LVL 1

    Accepted Solution

    This line:

    Should have a lower case 'v' in value like this:
    LVL 2

    Author Comment

    This is why I am not a javascript guy!


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Article by: DanRollins
    This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (, we'll extend the program by adding a depth-…
    This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
    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…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now