Multiple insert
Multiple insert
![Tropicalista](https://secure.gravatar.com/avatar/60e61da2da80b44e3966a0a2d6396a12/?default=https%3A%2F%2Fvanillicon.com%2F60e61da2da80b44e3966a0a2d6396a12_200.png&rating=g&size=120)
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.