Open Muiter1 opened 6 years ago
Solution is moving a part of the code to an JS event.
<script>
$(document).ready(function() {
var $sigdiv = $("#signature")
$sigdiv.jSignature() // inits the jSignature widget.
// after some doodling...
$sigdiv.jSignature("reset") // clears the canvas and rerenders the decor on it.
})
</script>
<script>
function copy()
{
// signature
var $sigdiv = $("#signature")
var datapair = $sigdiv.jSignature("getData", "svgbase64")
document.getElementById("signature_svg").value = datapair[1];
}
</script>
I have this script running, the user can place it's signature. But I am not succeeding in getting the
svg
information that was generated copied to an text field so I can send it with this html form to my database.I am not detecting any errors in my console.
Any suggestions how to get the information of
signature
intosignature_svg
so I can send the form with this information?