Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
systems:yii2:using_ajax [2018/05/31 11:14]
smayr [Examples]
systems:yii2:using_ajax [2018/05/31 11:16] (current)
smayr [Using JQuery $.get() or $.post()]
Line 161: Line 161:
          $.post({          $.post({
             url: aUrl,              url: aUrl, 
-            dataType: "json", 
             data: {id: anId},             data: {id: anId},
             success: function( data ) {             success: function( data ) {
Line 170: Line 169:
                 console.log("Status: " + status );                 console.log("Status: " + status );
                 console.dir( xhr );                 console.dir( xhr );
-            }+            }
 +            dataType: "json"  // return data type
         });         });
      ',      ',