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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -