scheme:user draws in canvas, canvas converted to image (png or jpeg), converted file is saved in specific dir on server, after drawing canvas user clicks button, all i could do is:
function to_image(){
var canvas = document.getElementById("canvas");
var data = canvas.toDataURL('image/png');}
how i can perform this task? (is there any way to do it without AJAX or not?)