obtaining record number xml bound table

A

Alex Bazan

Hi! I've got a table bound to an xml and i would like to do something like
this:

<XML ID="myxml">
<MYXML>
<ROW>
<field1>aaaa</field1>
<field2>false</field2>
</ROW>
<ROW>
<field1>bbbb</field1>
<field2>true</field2>
</ROW>
</MYXML>
</XML>

<table datasrc="#myxml">
<tr>
<td><span datafld="field1"></td>
<td><script>if (##don't know what to write##.field2=="true")
document.write('<img src=myimage.gif>');</script></td>
</tr>
</table>

So depending on the value of field2, it displays the image or not.

I've tried with window.event.srcElement.recordNumber using:
if
(myxml.XMLDocument.selectSingleNode("/MYXML/ROW["+((window.event.srcElement.
recordNumber)-1)+"]/field2").nodeTypedValue=="true") .... blah blah

window.event.srcElement.recordNumber is what i use to execute onClick
functions on a row, but when the data is loaded (as this is an event
property) it gives me a JS error.

I found a post from someone who got stuck with this long ago, so if i've not
explained myself alright, read this:
http://groups.google.com/groups?selm=#tFsDN4wAHA.1800@tkmsftngp03&output
=gplain

any ideas?
thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top