Environment:
I'm running into a problem all of a sudden and am hoping someone here can spot what I'm missing.
DCT Code:<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE datacapture SYSTEM "datacapture5.0.dtd">
<data-capture-requirements type="content">
<ruleset name="article">
<script location="webserver" src="/iw-mount/default/main/ED/en/STAGING/formapi/globalfunctions.js"/>
<script location="webserver" src="/iw-mount/default/main/ED/en/STAGING/formapi/article.js"/>
...
<item label="Article Section" name="Article Section">
<replicant default="1" max="1000" min="0" required="f">
<item name="Outline Level">
<select required="t">
<option label="1" selected="t"/>
<option label="2"/>
<option label="3"/>
</select>
</item>
<item name="URL Anchor Name">
<text maxlength="50" required="f" size="50"/>
</item>
<item name="Section Header">
<text maxlength="255" required="f" size="55"/>
</item>
<item label="Section Body" name="Section Body">
<textarea cols="80" rows="10" wrap="virtual"></textarea>
</item>
<item name="Page Break Indicator">
<radio required="t">
<option label="Yes" value="1"/>
<option label="No" selected="t" value="0"/>
</radio>
</item>
</replicant>
</item>
</ruleset>
</data-capture-requirements>
FormAPI (article.js) Code:function init(){
...
IWDatacapture.getItem("/Article Section[1]/Page Break Indicator").setValue("0");
IWDatacapture.getItem("/Article Section[1]/Page Break Indicator").setVisible(false);
IWEventRegistry.addItemHandler("/Article Section", "OnReplicantAdded", Event_replicant);
...
}
...
function Event_replicant(item){
alert("IN");
var tmp = IWDatacapture.getItem(item.getName() + "/Page Break Indicator");
alert("tmp: " + tmp);
alert("tmp value: " + tmp.getValue());
tmp.setValue("0");
alert("and ...");
tmp.setVisible(false);
alert("OUT");
}
...
Alerts Seen
I can't figure out why this is failing on the setValue() line.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com