[jQuery] Dynamically Added Select not submitted
I have some code that creates SELECT HTML dynamically using jQuery
(verified with alert() and DOM Inspector). It works as expected in
IE, but in Firefox the dynamically added SELECTs are not submitted
with the form. Is this a known bug? I am tearing my hair out trying
to figure this one out.
Here is the code snippet that appends the new SELECT:
ele = virginAttrRule.clone();
$("select[@name^='name_']",ele)[0].name = 'name_'+iCount;
$("select[@name^='value_']",ele)[0].name = 'value_'+iCount;
$("select[@name^='condition_']",ele)[0].name = 'condition_'+iCount;
...
$("#rules").append(ele);
virginAttrRule is a clone of a DIV tag that contains 3 SELECT tags
(name_,value_,condition_).
#rules is the parent TD tag.