Solved

add name to textbox entry

Posted on 2015-01-07
1
57 Views
Last Modified: 2015-01-21
Hi,

I am using cakephp and I want to click a button and a database field appears on the text area .
I just need to know how to use javascript to add  string to a text area . This is a js issue and not a cakephp

This is the textbox I have already which works fine along with the js not listed here
 echo $this->Form->input('message',  array('label'=>'Message','value'=>'','name'=>'message',
                       'type' => 'textarea','style'=>'width:300px; height:200px;',
                        'OnKeyUp'=> 'limitText(this.form.message,this.form.countdown2,150)',
                        'OnKeyDown'=> 'limitText(this.form.message,this.form.countdown2,150)'));

Open in new window

0
Comment
Question by:jagguy
1 Comment
 
LVL 18

Accepted Solution

by:
nap0leon earned 500 total points
Comment Utility
<input id="val1" type="textarea" value="" size="150"/>
<script>
document.getElementById('val1').value = "value goes here";
</script>

Open in new window

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

771 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

9 Experts available now in Live!

Get 1:1 Help Now