I have a JS array. Each element of that array is a form data in JSON format. I want to loop through this array and submit each form data to the server WITHOUT using AJAX. Can this be done? Any ideas would be a help.
Asked
Active
Viewed 66 times
0
-
So what is the issue? Put the data in a form field and submit the form. – Leigh Jan 24 '16 at 02:44
2 Answers
0
One solution I know is Using Angualar JS service $http
$http({
method : 'POST',
url : 'clone.php or servlet or other calls',
data : $scope.user, //forms user object
headers : {'Content-Type': 'application/x-www-form-urlencoded'}
})
.success(function(data) {
//do something
});
References :
-
Angular js is not being used in the project. Anyways, the above code too will be like an AJAX request which I cant use – RJA Dec 20 '15 at 16:42
0
I don't see if you mentioned where this is executing but if it's not client side (I'm assuming server side since this is tagged CF), you could CFHTTP
each item by looping through the array.

Paul Sturm
- 2,118
- 1
- 18
- 23