Programmatically remove repeating table row using JScript

M

Martyn Lawson

Hi,

I have a repeating table with a handful of columns. I would like to empty
the table using a button press in JScript. Is this possible?

I have seen blogs talking about using eventObj.Source but since i am using a
button press, the source has no relation to the table.

Any ideas would be greatly appreciated.

Cheers,
Martyn...
 
F

Franck Dauché

Hi Martyn,

What about:
var node = XDocument.DOM.selectSingleNode(
"my:myFields/my:group1/my:group2[my:id = 2]" );
node.parentNode.removeChild( node );
To remove 1 specific node, and:
var allnodes = XDocument.DOM.selectNodes( "/my:myFields/my:group1/my:group2"
);
allnodes.removeAll();

Hope that it helps.

Regards,

Franck Dauché
 

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

Top