Reputation: 35
Here splitValues contains array and .split is a class in multiline texbox which is generated dynamically now i want fill the textbox with this array. I have done this much but not getting further?
function InsertItems(splitValues) {
$(".split").each(function () {
if (splitValues != "") {
$(this).val(splitValues);//
}
});
}
Upvotes: 1
Views: 784
Reputation: 74738
change this:
$(this).val(splitValues);//
to this:
$(this).val(splitValues.join());//
$(".split").each(function (i, elem) {
$(this).val(splitValues[i]);//
});
Milind
.Upvotes: 2