Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dojo autocomplete=on for textfields

Tags:

dojo

I had changed my app from using normal html textfields to dijit textfields. After adding the dojo the textfields are not showing the previously entered values in the textfields as soon as i type the first character so that i need not type the text again.. is this the default behaviour of dijit textfield widget. how can i make the textfield autocomplete. please help me. i tried using the below statement in addOnLoad method but no luck

dojo.attr(dijit.byId('username').textbox, "autocomplete", "on");
like image 513
swingmicro Avatar asked Jan 22 '26 13:01

swingmicro


1 Answers

How did you declare your textfield ? The following works for me :

<div id="form1" data-dojo-type="dijit.form.Form" method="post">
    <input data-dojo-type="dijit.form.TextBox" name="text" id="text" autocomplete="on"/>
    <input type="hidden" name="delay" value="2"/>
    <button data-dojo-type="dijit.form.Button" type="submit">Send</button>
</div>

See http://jsfiddle.net/psoares/YZeTB/

like image 115
Philippe Avatar answered Jan 25 '26 20:01

Philippe