});
item.val(value);
} else if (type == "list-multi") {
- value = new Array();
- $(this).find("value").each(function() {
- value[value.length] = $(this).text();
+ $(this).children("value").each(function() {
+ item.children('option[value="' + $(this).text() + '"]').each(function() {
+ $(this).attr("selected", "selected");
+ });
});
} else {
item.val($(this).find("value").text());
st.c("field", {"var": $(this).attr("name")});
if (this.nodeName.toLowerCase() == "select" && this.multiple) {
for (var i = 0; i < this.options.length; i++)
- if (options[i].selected)
- st.c("value").t(options[i]).up();
+ if (this.options[i].selected)
+ st.c("value").t(this.options[i].text).up();
} else if (this.nodeName.toLowerCase() == "textarea") {
var sp_value = this.value.split(/\r?\n|\r/g);
for(var i = 0; i < sp_value.length; i++)