javascript - Saving Value from check to mysql database (Angular Js,J2EE,Mysql) -
i getting data database array- in view code is-
<tr role="row" ng-repeat="result in searchresults"> <td class="sorting_1"><input type="checkbox" ng-model="result.status" ng-change="savecheckboxvalue(result.status)"/></td> </tr>
on clicking checkbox want update value, js :-
$scope.savecheckboxvalue = function(data){ $scope.result.status= (data == true ? 1 : 0); alert($scope.result.status); var successcallback = function(){ $.growl.notice({ message: "updated successfully!" }); $location.path("/attendance"); //$scope.get(); $scope.displayerror = false; }; var errorcallback = function() { $scope.displayerror=true; }; $scope.result.$update(successcallback, errorcallback); }
i getting error :
put localhost...... 405 method not allowed
help solution or idea , how can it?
Comments
Post a Comment