I use jquery facebox as delete confirmation box. When i do a delete it removes my record and i show the resultsdiv via javascript. But it always shows
Error: document.getElementById("ImageButtonDiv") is null
here is my code,
protected void Delete_Click(object sender, EventArgs e)
{
// my delete
ScriptManager.RegisterClientScriptBlock(Delete, typeof(Button), "dele",
"ShowImageButtonDiv();topBar('Successfully Deleted');", true);
}
and my javascript function,
function ShowImageButtonDiv() {
document.getElementById("ImageButtonDiv").style.display = 'block';
document.getElementById("datatable").style.display = 'block';
document.getElementById("adddiv").style.display = 'none';
return true;
}
EDIT:
When my delete confirmation is not within a jquery facebox it gets my element. What could be the issue?
I ve replaced but still not working,
ScriptManager.RegisterClientScriptBlock(LbDelete, typeof(LinkButton), "dele",
"jQuery(document).ready(function(){UsersDatatable('" + HfJsonString.Value + "');
ShowImageButtonDiv();topBar('Successfully Deleted');});", true);