Hi,
I have an application to save the canvas data instantaneously to server. My requirement is to export the canvas data on every second, save it to the server through ajax and import the same data to another canvas in another browser through ajax. I am using Jquery for ajax. I used the following code to pass the data
function sendCanvasData() {
var data = '';
var ctx = document.getElementById('imageView').getContext('2d');
data = ctx.getImageData(0, 0, 250, 250);
$.post("canvas.php", {
cdata: data
});
}
But it passing a null value to the server. How can I do this ?