i have a controller.js which makes a JSON call to a php file. In the php file i need to see a few values, when I echo it it does not show.
here my code:
//Controller.js
show: function(data) {
var self = this,
salesquoteguid = data && data.salesquoteguid || self.salesquoteguid;
$.getJSON('data/load.salesquote.php', {salesquoteguid: salesquoteguid}, function(data) {
self.set('salesquoteguid', salesquoteguid);
self.set('content', data);
self.set('pricemethod', data.pricemethod);
self.set('salesquoteitems', data.salesquoteitems);
});
},
//data/load.salesquote.php
function getSalesquoteitemRecords(//some parameter)
{
if ($contentlocation = App::getContentLocation()) {
$contentlocation.= 'images/item/';
$targetDirExists = PATH_CLEVVA.$contentlocation;
$targetDir = PATH_CLEVVA_DISPLAY.$contentlocation;
}
echo $contentlocation; // I need to see this value
}
when i refresh my page i get a "NO" displayed at the top???
what is the best way to display values when you mix js with php? thanks