Hi everyone,
I am having trouble with data bound html table and an XML data island...
The problem:
When the data island has no records, the table does not respond when trying to add records. In addition, the table shows 1 row when there arent any in the data island.
To replicate the problem:
I have included the files that I am using to test. Save all the files to a the same directory to run them.
The data.xml file contains the XML that will be used to run the initial test. When the page.htm is loaded in the browser, the page displays the data in the table. Rows can be added and removed using the Insert and Delete buttons. You can check the contents of the data island at any time by using the Show data button.
Test 1
Load the page.htm and delete all the records using the Delete button. Check that the data island is empty by using Show data. The XML should look like this:
Now add records using Insert and edit the contents by typing in the cells. The table should respond to the insert by adding rows. Check the data using Show data. You should now have XML that resembles the following:
Code:
<root>
<row>
<key>key value</key>
<value>value value</value>
</row>
<row>
<key>aehasdh</key>
<value>asddh</value>
</row>
<row>
<key>asdhsdh</key>
<value>asdhsdh</value>
</row>
</root>
Test 2
Change the data island, id="data", to be empty.xml. Load the page.htm and check the data using Show data. The XML should look like this:
This will highlight the first of my problems...that the table shows one row when there are no records in the data island.
Now try add records using Insert. This highlights my second problem..the table does not respond. Check the data using Show data. You should now have XML that resembles the following:
Code:
<root>
<row>
<key>key value</key>
<value>value value</value>
</row>
<row>
<key>aehasdh</key>
<value>asddh</value>
</row>
<row>
<key>asdhsdh</key>
<value>asdhsdh</value>
</row>
</root>
This confirms that the data is being added, but the table is not responding.
This is a real problem since it is entirely possible that there is no data for a particular list. Does anyone know a work around?
Please, is urgent!
Assume: IE5+
Thanks