alfonso
Posts: 121
|
| Posted: 04/09/2010, 11:38 AM |
|
Hi!
Well, i have another question about update panel, some times i need to hide update panel, for example when i donīt have any values in a table and i donīt have any value to show then i hide an update panel.
the problem is in IE, when i charge a page and update panel visibility goes to false then shows me a javascript alert that says me: funciont refresh null, of course i undestand that doesnīt "found" my panel cause is invisible.
in firefox doesnīt appear the message, what can i do?? thanks
|
 |
 |
alfonso
Posts: 121
|
| Posted: 04/09/2010, 11:56 AM |
|
Well, i answer myself twice this day hehe.
The problem is in javascript code when is going to start a panel, the original code is this:
function panel_noticias_start(sender) {
var panel = $("panel_noticias");
panel.onrefresh = function()
{ };
AjaxPanel.init(panel);
AjaxPanel._bind(panel);
panel_noticias_bind(sender);
}
And i do this fix:
function panel_noticias_start(sender)
{
var panel = $("panel_noticias");
if (panel == null)
{}
else{
panel.onrefresh = function()
{ };
AjaxPanel.init(panel);
AjaxPanel._bind(panel);
panel_noticias_bind(sender);
}
Only thing i do is to put in and if clause that check if the panel exists (is visible) and then if itīs not code doesnīt run and IE doesnīt show the alert.
|
 |
 |
|