Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
JSON string
Message
Information générale
Forum:
Javascript
Catégorie:
Autre
Titre:
Divers
Thread ID:
01595222
Message ID:
01595353
Vues:
34
>I can't find an example of a form with the canvas and dropping the string into it. I'll keep looking :-)
>

The example for that is right on the page I linked to.

Embed this in your page:

The HTML:
<div class="sigPad signed">
  <div class="sigWrapper">
    <div class="typed">Name of the person here</div>
    <canvas class="pad" width="200" height="55"></canvas>
  </div>
</div>
Then further down, at the bottom of your HTML page embed the Javascript:
<!--[if lt IE 9]><script src="flashcanvas.js"></script><![endif]-->
<script src="jquery.min.js"></script>
<script src="jquery.signaturepad.min.js"></script>
<script src="json2.min.js"></script>
<script>
// Replace the section in brackets with the info from your database
var sig = [{lx:20,ly:34,mx:20,my:34},{lx:21,ly:33,mx:20,my:34},…];

$(document).ready(function () {
  $('.sigPad').signaturePad({displayOnly:true}).regenerate(sig);
});
</script>
You can also look at their sample page source code:

http://thomasjbradley.ca/lab/signature-pad/regenerate/
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform