views:

98

answers:

2

Hi

Am currently debugging an application with firebug and I would like to view what json/XML values my urls are returning. Am using the MVC structure and therefore something close to

jQuery("#list1").jqGrid({       
      url:'http://localhost/Zend/jqueryapp/public/artist/index',    
      datatype: "json",    
      mtype: 'GET',
     //console.log("http://localhost/Zend/jqueryapp/public/artist/index"),

the console.log bit is the challenge.

How do I hack this?

+1  A: 

You can view the responses by expanding the requests under the net tab in Firebug without any extra work.

If you don't want to dig through that while debugging and want to output just the values right away, then you can put the logging inside a callback after the request.

Something like:

jQuery("#list1").jqGrid({
    url:'http://localhost/Zend/jqueryapp/public/artist/index',    
    datatype: "json",    
    mtype: 'GET',
    loadComplete: function(xhr) { 
        //get values to log from xhr
        //console.log()
},
Alo
A: 

Open the "net" tab and open the request and then the "response" tab.

neshaug