Changeset 11772
- Timestamp:
- 12/10/07 10:57:49 (8 months ago)
- Location:
- dijit/trunk
- Files:
-
- 2 modified
-
form/Textarea.js (modified) (1 diff)
-
tests/form/test_Textarea.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/form/Textarea.js
r11660 r11772 122 122 // the cryptic name and will also convey the role information to the user. 123 123 // Because it is read directly to the user, the string must be localized. 124 // In addition, since a <label> element can not be associated with an iframe, if 125 // this control has a label, insert the label text into the title as well. 124 126 var _nlsResources = dojo.i18n.getLocalization("dijit", "Textarea"); 125 127 this._iframeEditTitle = _nlsResources.iframeEditTitle; 126 128 this._iframeFocusTitle = _nlsResources.iframeFocusTitle; 129 var label=dojo.query('label[for="'+this.id+'"]'); 130 if(label.length){ 131 this._iframeEditTitle = label[0].innerHTML + " " + this._iframeEditTitle; 132 } 127 133 var body = this.focusNode = this.editNode = document.createElement('BODY'); 128 134 body.style.margin="0px"; -
dijit/trunk/tests/form/test_Textarea.html
r11475 r11772 22 22 23 23 <form id="form1" action="" name="example" method="post"> 24 < textarea name="plainTextArea" rows=5>24 <label for="plain">HTML textarea: </label><textarea name="plainTextArea" id="plain" rows=5> 25 25 this is a plain text area 26 26 for comparison 27 27 </textarea> 28 <br>< textarea id="programmatic"></textarea>28 <br><label for="programmatic">programmatically created:</label> <textarea id="programmatic"></textarea> 29 29 <script type="text/javascript"> 30 30 // See if we can make a widget in script … … 38 38 }); 39 39 </script> 40 <br> Inline:<div name="simpleTextArea" dojoType="dijit.form.Textarea" style="width:33%;border:20px solid red;"40 <br><label for="simple">Inline:</label><div name="simpleTextArea" dojoType="dijit.form.Textarea" id="simple" style="width:33%;border:20px solid red;" 41 41 onChange="dojo.byId('ocSimple').value=arguments[0]" 42 42 >this is a very simple resizable text area</div>