i am using Jsignature to capture signatures and im trying to post the retrieve the image once it has been created.
This is the code I use to grab the code jSignature('getData', 'base30')
Then i print that out to a hidden textarea which is carried through to the next page.
<p>Signature:</p>
<script src="libs/jSignature.min.js"></script>
<div style="width:70%; margin:30px auto 0;"id="signature"></div>
<textarea style="display:none;"; rows="10" cols="50" id="test" name="signature"></textarea>
<p onclick="testing">Click Here</p>
<button id="export" type="submit">I accept the terms and conditions of this agreement.</button>
</form>
</div>
</div>
<script>
$(document).ready(function() {$("#signature").jSignature()})
$(document).ready(function(){
$("#export").click(function(){
var test = ($('#signature').jSignature('getData', 'base30'));
document.getElementById("test").innerHTML = test;
});
});
</script>
I found this code on the website i downloaded the project from
<img src="<?php echo $src2 ?>">
so i created a variable which post takes in the Code taken from the signature and called it in the image like it told me to, however i image is broken and it keeps givening me a 403 forbidden error in the console.
This is the source it is looking for. http://localhost/sign/image/jsignature;base30,cW9bcffllnqmhigb97431Z13466898aaadjltt1w2D1E1A1Xphdb76Y7_4S132123312000Z4675656835446523100Y2333554200001013_7M666abdejejk1Enkqsn3Tiged765Zchj1A1y1B1A1B1F1B1A1E7z1D1vth4Y79belpp1A1C1H1M1K1R1J1I1I1G1B1A1vspn1R_3N00000000000111201Z1325533220001202002Y1h2120825367889944522000000Z2018
I was wondering if anyone who why it wasnt working and how to make it work?