javascript - How to output jsignature after page reload -


I am using the jsignature plugin () to allow users to 'sign' a form. It all works correctly, but I am trying to output signature after page reloading in the same canvas, so if it is necessary then it can be edited further (this only occurs when the form Verification fails for any reason).

I do not understand if I can do it properly before reloading the page, but if I try to reload, I get an error: jSignature '' Unable to find import plugin for 'undefined' format and it does not work.

So if I use the following JS code on the Submit button, it works correctly (cleans the canvas and then redraws it):

  $ ("# Signature") .jSignature ({UndoButton ': true}); Jsignature ("getData", "base30"); Var datastr = "data: Click + datapair.join (" ("# qmembershipsubmit") as ("# qmembershipsubmit") (function (e) {var datapair = $ ('# signature', "$ (" # signature) "$ (" # Sign "); JSignature (" reset "); Warning ('should be approved'); $ (" # sign "). JSignature (" importData ", datastr); return false; });  

However I do not want to validate the JS form and pass the value through the form and then if necessary it is to reuse it on the following page. I use the following code (so it executes the import data command using string stored in # signature_capture2) I am unable to get import plugin error:

  $ ("# signature "('UndoButton': true}); If ($ ('' recreatesig ''). Val () == '1') {Warning ('sabbath'); $ (" # signature ") jSignature. (" IMPORTDATA ", $ ('# signature_capture2') Val ().);} $ ('# Qmembershipsubmit') click (function (e) {var datapair = $ ('# signature'). JSignature ("getData", "base30"); Var datastr = "data:" + datapair.join (","); $ ("# Signature_capture2"). Val (datastr);});  

The value of the datastore matches the value stored in signature_capture2, so I can not see for my life why this is not working, of course it is effectively Is talking (and it is being reloaded on the same page so that both plugins / js are included on the script).

If anybody can put light, then it will be widely appreciated.

Cheers,

Dave

me jSignature (" GetData "," default "), it becomes possible that data usage in base 64 can be used on IMG tags and also works while using import data.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -