Solved

add name to textbox entry

Posted on 2015-01-07
1
65 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

622 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