Hello
I have found a company that sells signature capture software, this example will store the signature as a gif in C:\
How can I save it into a field within a database using PHPRunner?
I was thinking about using it on an add page and save it as agif along side a table_id number.
Here is the code.
If you copy and paste it and save as a html, you can test it yourself. I have put a demo on the demo site here Demo Site
Cheers
Paul.
<HTML>
<HEAD>
<TITLE>Web Signature control - Sample - Save Signature Locally from Web Page </TITLE>
</HEAD>
<!-- =========== BODY ============= -->
<BODY>
<!-- OnPageLoad checks for proper function OnLoad= "OnPageLoad()"
of OCX when page is loaded
-->
<H2>Bennet-Tec Web Signature Control </H2>
<UL>
<P> This sample application captures a handwritten <BR>
signature within a web page and saves the image <BR>
to a local GIF image file <BR>
<P>
Put your signature in the box below <BR>
and click the Submit button. <BR>
</P>
<P>
<!-- Embed the Signature Control -->
<OBJECT id="WebSignature" name="WebSignature" width="180" height="55"
onerror= "OnOCXError()"
classid= "clsid:4E534257-3000-4E22-83A5-AD614CB96642"
CODEBASE= "WebSign.i386.CAB#version=1,0,3" >
<PARAM name="BorderWidth" value= "-1">
<PARAM name="BaseLine" value= "80">
<PARAM name="LicensedSite" value= "DEMO" >
<PARAM name="LicenseKey" value= "DEMO">
</OBJECT>
<P>
<!-- button to allow user to clear -->
<INPUT type="button"
Width = "400"
onclick="OnClear()"
value="Clear">
<!-- button to allow user to Save -->
<INPUT type="button"
onclick="OnSubmit()"
value="Save Signature">
<P>
Your signature will be saved on your computer <BR>
at C:\Signature.Gif
</P>
</UL>
</BODY>
<!-- ===========END OF HTML BODY ============= -->
<script language="JScript">
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* - On PageLoad we call this function as a test - - - - - - */
/* - to verify control is properly loaded and working - - - */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function OnPageLoad ()
{ /* This routine called by BODY OnLoad event */
try
{
/* Call Clear method at start to test
/* that the signature control is installed */
WebSignature.Clear();
}
catch(e)
{
/* If clear does not work then control is not installed */
/* Redirect user to page with instructions to install */
document.location.href = "InstallError.htm";
}
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function OnOCXError ()
{
document.location.href = "OCXerror.htm";
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function OnClear ()
{
WebSignature.Clear();
}
var WSF_PICTURE = 0x80; // - Raster Bitmap image
var WSF_PICTUREGIF = 0xC0; // - GIF image
var WSF_ORIGINALSIZE = 1; // - Use original picture size
// (do not strip spaces around the signature).
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function OnSubmit ()
{
WebSignature.SavePicture("C:\\signature.gif",
WSF_PICTUREGIF + WSF_ORIGINALSIZE );
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
</SCRIPT>
</HTML>