Hi all,
i have a script with 2 arguments and i need to implement it into my dct onkey event validation how can i do this. here is the code. like this we have
<?xml version="1.0" standalone="no"?>
<!DOCTYPE data-capture-requirements SYSTEM "datacapture6.0.dtd">
<data-capture-requirements>
<ruleset>
<description>Product</description>
<script language="javascript" src="/templatedata/common.js"/>
<script>
<![CDATA[
IWEventRegistry.addItemHandler("/Product/General Information/full_product_name", "onkeypress", CheckLength(this, 3));
function CheckLength(obj, max) {
if (parseInt(max) > parseInt($(obj).val().length)) {
}
else {
alert("Exceded max lentgh");
}
}
]]>
</script>
<root-container name="Product" location="Product">
<tab name="General Information">
<label>General Information</label>
<item name="full_product_name" pathid="full_product_name" >
<label>Full Product Name</label>
<description>Enter Full Product Name</description>
<textarea rows="2" column="75"/>
</item>
</tab>
</root-container>
</ruleset>
</data-capture-requirements>
please advise
Karthik