An Active.Xml.Table related issue
Hi,
How do i search a grid populated with XML Data. I am using the following code :
//Global
var table = new Active.XML.Table;
function searchGrid()
{
var colToBeSearched = document.getElementById('colSearchName').value;
var toSearch = document.getElementById('txtAdvSearch').value;
var res = 0;
//alert(obj.getDataModel());
for(var x=0; x<table.length; x++)
{
if((table[x][colToBeSearched].indexOf(toSearch)) >= 0)
{
obj.getTemplate("row", x).setStyle("color", "white");
obj.getTemplate("row", x).setStyle("background", "blue");
res++;
}
else
{
obj.getTemplate("row", x).setStyle("color", "black");
obj.getTemplate("row", x).setStyle("background", "white");
}
}
document.getElementById('result').innerHTML = "<b>Number of matches : "+res+"</b>";
}
Where am I wrong.
How do i search a grid populated with XML Data. I am using the following code :
//Global
var table = new Active.XML.Table;
function searchGrid()
{
var colToBeSearched = document.getElementById('colSearchName').value;
var toSearch = document.getElementById('txtAdvSearch').value;
var res = 0;
//alert(obj.getDataModel());
for(var x=0; x<table.length; x++)
{
if((table[x][colToBeSearched].indexOf(toSearch)) >= 0)
{
obj.getTemplate("row", x).setStyle("color", "white");
obj.getTemplate("row", x).setStyle("background", "blue");
res++;
}
else
{
obj.getTemplate("row", x).setStyle("color", "black");
obj.getTemplate("row", x).setStyle("background", "white");
}
}
document.getElementById('result').innerHTML = "<b>Number of matches : "+res+"</b>";
}
Where am I wrong.
Cris Nagle
October 19,