Jump to content

Help Converting JSON back to an image


simeonC

Recommended Posts

I have some JSON data that I retrieved from my database which is suppose to represent customers signatures. However I can now capture it but I cannot display it back on to the canvas field because i do not know how..

Is there anyone out there that know how to accomplish this task in the  most simpliest way..

I am currently reading

document from -- since it is his program

http://thomasjbradley.ca/lab/signature-pad/#options-ref

but I cannot seem to get it done

 

Any help would be appreciated Thank you.

Link to comment
Share on other sites

There is an example right there on the page you linked:

$('.sigPad').signaturePad({displayOnly:true}).regenerate(sig);
Where sig is the JSON data from your database. Have PHP echo out your JSON to a sig variable and then use the line above.

 

var sig = <?php echo json_encode($jsonFromDb); ?>;
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.