javascript - Handlebars and textarea -
i trying learn handlebars use in mvc app. have following in template:
<div class="control-group"> <label class="control-label" for="emailhtml">html:</label> <div class="controls"> <textarea id="emailhtml" name="emailhtml" cols="36" rows="5"/> </div> </div> and here json:
{"data":{"results":[{"emailhtml":"xyz"}],"name":"test business"}} after executing above see textarea correct width , height, don't see data in it.
i tried inserting value="{{this.emailhtml}}" still doesn't work.
how textarea populated in template?
shouldn't more like:
<div class="control-group"> <label class="control-label" for="emailhtml">html:</label> <div class="controls"> <textarea id="emailhtml" name="emailhtml" cols="36" rows="5">{{emailhtml}}</textarea> </div> </div> the value of <textarea> not in value attribute, resides between tags. see: http://www.w3.org/tr/html401/interact/forms.html#h-17.7 , http://www.w3.org/tr/html-markup/textarea.html , among others.
Comments
Post a Comment