Microsoft KB Archive/262610

= FIX: Oncellchange Event of the XML DSO Fires Twice =

Article ID: 262610

Article Last Modified on 10/15/2002

-

APPLIES TO


 * Microsoft XML Parser 2.0

-



This article was previously published under Q262610



SYMPTOMS
The oncellchange event of the XML Data Source Object (DSO) is fired when the value of an XML data element is modified in scripting code. This event fires twice in succession in MSXML 2.0, which is not the desired behavior.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

This problem has been fixed in the MSXML 2.5 parser.

You can obtain the most current parser update on the MSDN page at the following Microsoft Web site:

http://msdn.microsoft.com/xml/general/xmlparser.asp



MORE INFORMATION
In the following code, the XML DSO is used to bind an XML data island to an HTML table. The VBScript procedure Notify in the SCRIPT tag is run when the oncellchange event of the DSO is fired.

The onClick event of the Change Name button element on the HTML page triggers the VBScript changename procedure in the SCRIPT tag. The changename procedure modifies the text of the Name element in the XML data, which causes the oncellchange event of the XML DSO to fire and the VBScript Notify procedure to run.

Steps to Reproduce Behavior
  Cut and paste the following code into a text file in Microsoft Notepad and save it as CellChangeTest.htm in a folder on your hard drive:

 Sub changename xmldso.XMLDocument.selectSingleNode(&quot;//Name&quot;).text = &quot;David&quot; End Sub

Sub Notify Msgbox &quot;Name has changed&quot; End Sub 

   John 727-879-8765 john@xyz.com</Email> </Person> </People>

<input type=&quot;Button&quot; value=&quot;Change Name&quot; onClick=&quot;changename&quot;>

</li> <li>Open CellChangeTest.htm in Internet Explorer, and note that the page displays an HTML table that is bound to the XML data.</li> <li>Click the Change Name button, and note that the message box that contains the Name has changed text is displayed twice in succession.</li></ol>

Additional query words: IE

Keywords: kbbug kbfix kbmsxml250fix KB262610

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.