jQuery .ajax call returning undefined or null in the success function call -


i have following jquery ajax call:

executeallajaxcalls:function() {     if (walmart.jquery.ajaxcalls.length) {         var datapassed = "ajaxcalls="+walmart.jquery.ajaxcalls;                  walmart.jquery.ajax({                url: walmart.jquery.ajaxframeworkurl                                  , data: datapassed             , datatype: walmart.jquery.jsonresponsetype                , type: 'post'                , success: walmart.jquery.ajaxobject_consolidated.processconsolidateddata         });     }        } 

the data coming in function call upon success undefined.

here function called upon success of ajax call:

processconsolidateddata:function(result) {     alert("1234"+result);     var responsedata = eval('(' + result.responsetext + ')');     if (typeof responsedata !== '') {         (resp in responsedata) {                 almart.jquery(document).ready(responsedata[resp].callbackfunction);                      }     } } 

why response null or undefined when struts action @ backend c:out valid json object. tips or pointers appreciated new jquery.

i think there error in code...

    (resp in responsedata) {             almart.jquery(document).ready(responsedata[resp].callbackfunction);                  } 

i think ment:

    (resp in responsedata) {             walmart.jquery(document).ready(responsedata[resp].callbackfunction);                  } 

i use jquery.parsejson instead of 'eval', unless necessary.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -