Marine1969
IS-IT--Management
I need to save a jsignature image where I found a script that works with tablets and phones to get the signature but I cannot get the save button to work. Does anyone have any suggestions? I have the code and the link to the script I found. Any help would be great. Thank you.
jsignature
jsignature
PHP:
<form action="rec_maint.php">
<input type="hidden" name="maint" value="cssig">
<input type="hidden" name="rec" value="edit">
<input type="hidden" name="sid" value="<?php echo $_GET['sid'];?>">
<div id="signatureparent">
<div id="signature"></div>
<button type="button" onclick="$('#signature').jSignature('clear')">Clear</button>
<button type="button" id="btnSave">Save</button>
</div>
<input type="hidden" id="hiddenSigData" name="hiddenSigData" />
<div id="scrollgrabber"></div>
<script src="jsig/src/jSignature.js"></script>
<script src="jsig/src/plugins/jSignature.CompressorBase30.js"></script>
<script src="jsig/src/plugins/jSignature.CompressorSVG.js"></script>
<script src="jsig/src/plugins/jSignature.UndoButton.js"></script>
<script>
$(document).ready(function() {
var $sigdiv = $("#signature").jSignature({'UndoButton':true});
// -- i explain from here...
$('#btnSave').click(function(){
var sigData = $('#signature').jSignature('getData','base30');
$('#hiddenSigData').val(sigData);
});
// -- ... to here.
})
</script>
</form>