jQuery validation with custom method

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
wasir
Forum Commoner
Posts: 49
Joined: Sun Jul 08, 2007 11:28 pm

jQuery validation with custom method

Post by wasir »

I am using an object (to get digital signature on my web form)

Code: Select all

<OBJECT classid=clsid:69A40DA3-4D42-11D0-86B0-0000C025864A id=SigPlus1 name=SigPlus1 VIEWASTEXT>
  <PARAM NAME="_Version" VALUE="131095">
  <PARAM NAME="_ExtentX" VALUE="6950">
  <PARAM NAME="_ExtentY" VALUE="1323">
  <PARAM NAME="_StockProps" VALUE="0">
</OBJECT>
On SUBMIT button a function is called

Code: Select all

onclick="setSig"
to fill a hidden control

Code: Select all

<input type="hidden" name="SigData" id="SigData" />
with the text value from above object.

Code: Select all

function setSig() {
  SigPlus1.TabletState=0;
  SigPlus1.EncryptionMode=1;
  SigPlus1.SigCompressionMode=2;
  document.FormName.SigData.value=SigPlus1.SigString;
}
If the object is not used (ie left blank) it output this text value:
FFFFFFFFF588410405000000040000008CA64DE9C1B123A78CA64DE9C1B123A78CA64DE9C1B123A78CA64DE9C1B123A78CA64DE9C1B123A7

:?: How can I make a custom method for jQuery Validation plugin to make the signature object mandatory :?:

Please HELP!
Post Reply