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.
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.