Hi...
i'm triggering a callback with JS to refresh a Grid with this code
Code: JavaScript
function Alterar()
{
var cmb = document.getElementById("<%=cmbCP.ClientID%>");
var clpr = cmb.options[cmb.selectedIndex].value;
if (typeof clpr == "undefined")
{
alert ("Selecione um Cliente Principal\n");
return;
}
var grd = <%=grVeic.ClientID%>
var item = grd.getSelectedItem();
if (typeof item == "object")
{
var placa = item.getCell(4).getValue();
var vid = item.getKey();
showPopWin('/Modal/mod_cadVeic_1.aspx?modo=alterar&placa='+placa+'&clpr='+clpr+'&vid='+vid,750,500, rtn, true);
}
else
{
alert("Selecione um motorista");
}
}
function rtn(returnVal)
{
if (returnVal==true) {
eo_Callback('CallbackPanel1','updGrid');
return true;
}
}
Basically, it gets the value from an ASP DropDownList, a Cell Value and Row Key from the Grid and launches and JS popup...
this pop up, when it closes, returns a value to the "rtn()" function... Until here is everything working fine... Tested it with and without all possible options... The problem is not here.
when the popup returns true, and JS executes the eo_Callback (which fires an Server Side Event), everything runs well, except that when the page unloads, and js exception is raised.
this error affects an ASCX, which was there the whole time, and nothing never happened...
It says that "Run-time erro of Microsoft JScript: 'this._backgroundElement.style' is null or not an object"; and points into a line inside the AJAX Toolkit ModalPopupExtender.
Tried replacing all the UpdatePanels by CallBackPanel in the ASCX, but it only works when I comment the eo_Callback...
any idea of what is going on??