Solved

add name to textbox entry

Posted on 2015-01-07
1
58 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
ID: 40537749
<input id="val1" type="textarea" value="" size="150"/>
<script>
document.getElementById('val1').value = "value goes here";
</script>

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

896 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

14 Experts available now in Live!

Get 1:1 Help Now