Multiple insert

Multiple insert

TropicalistaTropicalista Posts: 6Questions: 0Answers: 0
edited September 2012 in General
Hi,

I need to make multiple insert with one form.

I have a form with a textarea. I use editor api to create and submit record.

I loop over textarea form and create my array of value, one per row. I then need to insert in the datatbase.

I've tried with api

[code]
myArray = $('#myTextarea').val().split("\n");

jQuery.each(myArray, function(i, val){
if (val.length != 0) {
editor.create( null, null, false );
editor.set( 'browser', val );
editor.submit();
}
})


[/code]

This only submit first element of array.

Is this a bug? or I should use someghing different?
This discussion has been closed.