I have an ajax call that sends some data to process.php and return back the image name. In process.php I returned the name as follows:

echo "image.png";

The ajax call is:

var $chart = $( '#chart' );
var $test = $( '#test' );
{date: DateStr, birthday: birthdayStr},
	function(filename) {
	var fdata="./images/"+filename;

the html is:

<div id="test"></div>
<div class="mainbody">
<div id="chart" class="mainimg">
<img width="700" height="408" alt='' />

so from test div i get the path printed right: (./images/image.png), but I don't get the image to be desplayed

if I'm not mistaken, divs can't have src attribute.. so try placing the id 'chart' in the img tag..

yes thats solved it, thanks.