开发者

Ensuring dynamically added Dojo Dijits are registered in the DOM

开发者 https://www.devze.com 2022-12-24 19:30 出处:网络
I need to dynamically create Dijits to add N rules to a particular form.Currently I am adding them with the following javascript.

I need to dynamically create Dijits to add N rules to a particular form. Currently I am adding them with the following javascript.

var value = new dijit.form.Select({
    id: "value_" + counter,
    store: ValueStore,
    searchAttr: "description"       
},
"stateSelect" + counter);
value.placeAt(form, "last");
value.startup();

This is creating the element correctly in the form, but it is not ass开发者_如何学运维ociated when the form actually posts. I know Dojo is recognizing the Dijit because the styling is correct. How can I make sure they are included in the DOM form?


Can you try giving your select a name attribute in addition to its id? HTML forms POST their elements by name, not by id.

0

精彩评论

暂无评论...
验证码 换一张
取 消