hi
i want to change WebAsyncRefreshPanel loading icon to my own custom icon.
is there any method/property or technique to do this?
Hi,
There are several options to pass javascript from server to WARP within async postback.
You can use CallBackManager.AddScriptBlock. That similar to register or ScriptManager.You can add to WARP a text (LiteralControl) which contains your javascript statements. The CallBackManager on client will process response and if it contains javascript blocks, then those scripts are forced to run, so, no extra actions from application are required.Any event on server can be used (click of button located in WARP, ContentRefresh, OnLoad if that is async postback of WARP, etc.)Below is example:
<igmisc:WebAsyncRefreshPanel ID="WARP1" runat="server" oncontentrefresh="WARP1_ContentRefresh"> <asp:Button ID="Button2" runat="server" Text="Button" onclick="Button2_Click" /></igmisc:WebAsyncRefreshPanel>
protected void WARP1_ContentRefresh(object sender,EventArgs e){ string js1 = "alert('AddScriptBlock');"; Infragistics.WebUI.Shared.CallBackManager.AddScriptBlock(this, this.WARP1, js1); string js2 = "<script type='text/javascript'>alert('LiteralControl');</script>"; LiteralControl cntl = new LiteralControl(js2); this.WARP1.Controls.Add(cntl);}
I would really like to use this in our application, does anyone know how one would get the WARP to actually call the JavaScript function?
HI,
You can change this on the Client-Side.
Here is a code snippet:
function WebAsyncRefreshPanel1_InitializePanel(oPanel)
{
var progress = oPanel.getProgressIndicator();
progress.setImageUrl("tips.gif");
}