Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This section of code invokes a abstract behavior ona page with a json request:

Code Block


//   make sure that callBackURL is a javascript variable set from  ajaxSaveBehaviour.getCallbackUrl().toString();

console.log(" call back url :"\+ callBackURL);
                             $.ajax({
                    url: callBackURL,
                                       url: callBackURL,
                    type: 'post',
                                       cache: false,

                                       data:JSON.stringify(ccbArry),
                                       contentType: 'application/json; charset=utf-8',
                                       dataType: 'json',
                                       success: function(json) {
                                               console.log(" reponse :"\+ json);

                    },
                                       },
                    error: function (XMLHttpRequest, textStatus, errorThrown) {
                                                       console.log("error :"+XMLHttpRequest.responseText);
                    }
                    

                });                    }
                    

                });

This section of code  is an abstract ajax behavior which accepts a json document in request and responds with another json  document that is then available to the  javascript method on the page. 

...