kathiefoley
Programmer
I am using IE6.0 and MSXML4.0.
I created a table which is bound to an XML dataisland. I attached a behavior to the bound input fields. The behavior has code behind the
onpropertychange event, which displays an expando property's content in an adjacent field (just for testing purposes). My problem is that the
onpropertychange event does not fire consistently for all the bound fields. If you run my example code and keep clicking the refresh button,
you will notice that the "OPC Test" field gets populated intermittantly.
Is this an IE6.0 bug? Has anyone else seen this behavior? Any workarounds? I would like to rely on the onpropertychange event firing for
each bound field to be able to implement masking.
Here is my sample DHTML which I named sysMask.html:
Here is my sample behavior (HTC) which I named sysMask.htc:
Here is my sample xml document which I named sample.xml:
If you put all three files in one directory and run the sysMask.html file you will see my test case.
Any help is appreciated!
Thanks,
Kathie
I created a table which is bound to an XML dataisland. I attached a behavior to the bound input fields. The behavior has code behind the
onpropertychange event, which displays an expando property's content in an adjacent field (just for testing purposes). My problem is that the
onpropertychange event does not fire consistently for all the bound fields. If you run my example code and keep clicking the refresh button,
you will notice that the "OPC Test" field gets populated intermittantly.
Is this an IE6.0 bug? Has anyone else seen this behavior? Any workarounds? I would like to rely on the onpropertychange event firing for
each bound field to be able to implement masking.
Here is my sample DHTML which I named sysMask.html:
Code:
<HTML>
<HEAD>
<style type="text/css">
.mask { behavior:url(sysMask.htc); color: red; }
</style>
</HEAD>
<BODY>
<XML ID="xmlSample" SRC="sample.xml"></XML>
<TABLE id="grdTest" datasrc="#xmlSample">
<THEAD>
<TR>
<TD><LABEL>OPC Test</LABEL></TD>
<TD><LABEL>OPC Test</LABEL></TD>
<TD><LABEL>OPC Test</LABEL></TD
</TR>
</THEAD>
<TBODY>
<TR>
<TD>
<DIV>
<INPUT id="mask_mskTest" xMaskType="number" />
<INPUT id="mskTest" class="mask" xMaskType="number" datafld="NUM" />
</DIV>
</TD>
<TD>
<DIV>
<INPUT id="mask_mskTest2" xMaskType="percent" />
<INPUT id="mskTest2" class="mask" xMaskType="percent" datafld="PERCENT" />
</DIV>
</TD>
<TD>
<DIV>
<INPUT id="mask_mskTest3" xMaskType="date" />
<INPUT id="mskTest3" class="mask" xMaskType="date" datafld="DATE" />
</DIV>
</TD
</TR>
</TBODY>
</TABLE>
</BODY>
</HTML>
Here is my sample behavior (HTC) which I named sysMask.htc:
Code:
<PUBLIC PROPERTY NAME="xMaskType" value="number"/>
<PUBLIC:ATTACH EVENT="onpropertychange" onevent="DoPropChange()" />
<SCRIPT LANGUAGE="jscript">
function DoPropChange()
{
var maskElem = element.parentElement;
var formatElem = maskElem.firstChild;
formatElem.innerText = element.xMaskType;
}
</SCRIPT>
Here is my sample xml document which I named sample.xml:
Code:
<?xml version="1.0"?>
<MASKLIST>
<ITEM>
<NUM>10000.12</NUM>
<DATE>1998-03-07</DATE>
<PERCENT>10</PERCENT>
<CUST>10AB20</CUST>
</ITEM>
<ITEM>
<NUM>14334.12233</NUM>
<DATE>1999-03-23</DATE>
<PERCENT>20</PERCENT>
<CUST>20AB20</CUST>
</ITEM>
<ITEM>
<NUM>0.76</NUM>
<DATE>2000-12-07</DATE>
<PERCENT>45</PERCENT>
<CUST>30AB20</CUST>
</ITEM>
<ITEM>
<NUM>1.76</NUM>
<DATE>2000-12-08</DATE>
<PERCENT>45.3</PERCENT>
<CUST>30AB44</CUST>
</ITEM>
<ITEM>
<NUM>33.90</NUM>
<DATE>2000-10-07</DATE>
<PERCENT>45</PERCENT>
<CUST>30AC30</CUST>
</ITEM>
<ITEM>
<NUM>-10.76</NUM>
<DATE>2000-02-07</DATE>
<PERCENT>100</PERCENT>
<CUST>30AC20</CUST>
</ITEM>
</MASKLIST>
If you put all three files in one directory and run the sysMask.html file you will see my test case.
Any help is appreciated!
Thanks,
Kathie