Hi all,
I am sending an ajax request on dblick for creating the image of the screen where it is double clicked.I am ising imagegrabscreen() function of PHP to create image but instead of creating its image it is creates a black image.
dblclick(function (ev,ui)
{
var response = $.ajax({
type:"POST",
url: "grabImage.php",
data:"name=John&location=Boston&function_name=img",
complete: function(msg){
var resp = msg.responseText;
if(msg && msg.readyState != 4) { alert("Ready State :"+msg.readyState); return; }
else{
//wb_load();
alert( "Data Saved: " + resp);
}
}
});
}
);
GRAB IMAGE FUNCTION
function img()
{
$im = imagegrabscreen();
imagepng($im, "C:\myscreenshot.png");
//echo $im;
//imagedestroy($im);
return $im;
define('imge',$im);
}