File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes TextArea in Javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "TextArea in Javascript" Watch "TextArea in Javascript" New topic

TextArea in Javascript

kwon yuu

Joined: Jul 20, 2010
Posts: 8
Hi all,
I would like to dynamically update the textarea in javascript. I have the code like this:

My test.js have the following function:

Portion of my application(interface) is as follow:

But when I run the application, my textarea is still blank.
There is no data being updated. Please HELP!
Is there something I am missing here?
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

Assuming you are calling your function at some point, the following different techniques will work:

Although, I only tested in Firefox. By the way, I wasn't sure about this approach so I spent 5 minutes googling and found the answer for you. The internet is littered with thousands of sites showing how to access frames and documents and forms. Where did you look?

GenRocket - Experts at Building Test Data
I agree. Here's the link:
subject: TextArea in Javascript
It's not a secret anymore!