Solved

add name to textbox entry

Posted on 2015-01-07
1
61 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: 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 explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

730 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