Are you still struggling with this? See the code from our "Draw a Robot" app (I'm the creator or RoCanvas):
Code:
function saveRobot(frm)
{
if(!frm.agree.checked)
{
alert("Please accept the distribution terms!");
frm.agree.focus();
return false;
}
var strImageData = canvas.toDataURL();
$.ajax({
url: "http://re.trotoys.com/drawarobot/",
type: "post",
data: "save=1&pic="+encodeURIComponent(strImageData)+"&robot="+frm.robot.value+"&author="+frm.author.value
+"&url="+frm.url.value,
success: function(msg)
{
window.location="http://re.trotoys.com/robots/id/"+msg+"/new/1/";
}
});
}
In order to have things working you need to pass this.form when calling the function. Perhaps it's best to visit my app and use View source to figure out how it works. I can share the PHP code too if that can help.