am i doing this right? i want to put the value of "i.src" into the input and then display the generated image on the other page using the post command
$('#create').bind('click', function(e){
var datapair = $sigdiv.jSignature("getData", "image")
var i = new Image()
i.src = "data:" + datapair[0] + "," + datapair[1]
$('#displayarea2').empty();
$(i).appendTo($("#displayarea2")); // append the image (SVG) to DOM.
$getElemenById('sig').value = i.src;
$document.getElemenById('sig').value = i.src;//store the value of i.src to input
alert("done1");
})
<input type="image" id="sig" name="sig" />
<?php echo $_POST["sig"]; ?>