I have a dijit dialog containing a form that I want to fill out automatically. I can display a dialog box with a form in it, but I was not able to set the value of the text area in the form. Here is the div where the html is located.
<div dojoType="dijit.Dialog" id="formDialog" title="Form Dialog" > <table> <tr> <td> <label for="desc"> Description: </label> </td> <td> <textarea id="desc" name="desc" dojoType="dijit.form.Textarea" style="width:200px;"></textarea>
SAVE CLOSE
I can get this to display just fine by doing
var formDlg = dijit.byId ("formDialog"); formDlg.show ();
But the problem is that I am setting the value of a text field called "desc". I tried a few things, but I know what I need
var test = dijit.byId("desc");
but if I set any property of the test, for example
test.value = "foo"; test.textContent = "foo"; test.innerHTML = "foo"; test.srcNodeRef = "foo";
The value is never saved and displayed inside the text box. Is there any trick for this? Any help would be great. Thanks
Isaac levin
source share