Multiple insert
Multiple insert
Tropicalista
Posts: 6Questions: 0Answers: 0
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?
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.