function getDataTable_callback(response)
{
// Obtenemos el DataTable y lo mostramos en el panel de resultados
var dt = response.value;
if(dt != null && typeof(dt) == "object" && dt != null)
{
var s = new Array();
s[s.length] = "<table id='dg' class='dg' cellSpacing='0'
cellPadding='0' align='center' border='0' style='display:block;
margin:0 auto; width:100%'>";
// HERE IS THE FIRST PROBLEM
var value = this.txtFilter.value;
for(var i=0; i<dt.Rows.length; i++){
s[s.length] = "<tr";
s[s.length] = " onclick='getItem(" + dt.Rows[i].id + ")'
class='dgItem' onmouseover='highlightItem(this)' ";
s[s.length] = " id=" + i + ">";
s[s.length] = "<td style='display:none'>" + dt.Rows[i].id +
"</td>";
s[s.length] = "<td>" + highlightText(dt.Rows[i].value1,
value) +
"</td>";
var value3 = "";
if (dt.Rows[i].value3 != "" && dt.Rows[i].value3 != null)
value3
= "(" + highlightText(dt.Rows[i].value3, value) + ")";
s[s.length] = "<td>" + highlightText(dt.Rows[i].value2,
value) +
" " + value3 + "</td>";
s[s.length] = "</tr>";
}
if(dt.Rows.length == ac.maxItems)
{
s[s.length] = "<tr class='dgItem'><td> ... </td><td
colspan='2'>
... </td></tr>";
}
s[s.length] = "</table>";
this.divFilter.innerHTML = s.join("");
var y = findPosY(this.txtFilter);
var x = findPosX(this.txtFilter);
this.divFilter.style.top = y + 18 + 'px';
this.divFilter.style.left = x + 0 + 'px';
if(dt.Rows.length > 0)
this.divFilter.style.display = "block";
else
this.divFilter.style.display = "none";
this.itemsCount = dt.Rows.length;
this.selectedIndex = -1;
}
else
{
this.lblResult.innerText = "";
alert("Error. [3001] " + response.request.responseText);
}
this.lblResult.innerText = "";
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at
http://www.ajaxpro.info/
Don't forget to read my blog at http://weblogs.asp.net/mschwarz/
-~----------~----~----~----~------~----~------~--~---