callserver command does not seem to work.
Pl find below the datacapture code
What else needs to b done
------------------------------------------
<?xml version="1.0" standalone="no"?>
<!DOCTYPE datacapture SYSTEM "datacapture5.0.dtd">
<data-capture-requirements type="content">
<ruleset name="Form validations">
<item name="Empno">
<label>Employee Number</label>
<text></text>
</item>
<script>
<![CDATA[
IWEventRegistry.addFormHandler("onSaveValid", validateForm);
//IWEventRegistry.addItemHandler("/Country", "onItemChange", getStatesByCountry)
function validateForm(item) {
var obj, employeenum, notvalidnum;
obj = IWDatacapture.getItem("/Empno");
employeenum = obj.getValue();
alert(employeenum);
notvalidnum = isNaN(employeenum);
if (notvalidnum) {
alert("Error:Invalid number entered.Please enter numeric values");
return false;
}
else {
alert("This is a valid number");
return true;
}
}
function getStatesByCountry(item) {
var countryId, countryName;
countryId = item.getOptions()[item.getValue()].value;
countryName = item.getOptions()[item.getValue()].text;
alert(countryId);
alert(countryName);
callServer("
http://localhost:8080/sc/cgi-bin/formapi_test.cgi", countryId, true);
alert("server successfully called");
}
]]>
</script>
<item name="Country">
<label>Country</label>
<database data-type="NUMBER(10)" />
<select required="f">
<inline command ="/opt/iw-home/iw-perl/bin/iwperl /default/main/test/WORKAREA/user/templatedata/cm/fmvld/test.pl" />
</select>
</item>
<item name="State">
<label>State</label>
<database data-type="NUMBER(10)" />
<select required="f">
<inline command ="/opt/iw-home/iw-perl/bin/iwperl /default/main/test/WORKAREA/user/templatedata/cm/fmvld/test.pl" />
</select>
</item>
</ruleset>
</data-capture-requirements>
--------------------------------------