|
Rank: Advanced Member Groups: Member
Joined: 12/26/2008 Posts: 45
|
I Have 2 simple CallbackPanel:
Code: C#
<eo:CallbackPanel runat="server" ID="qwe1" UpdateMode="Conditional" AutoDisableContent="True" Triggers="{ControlID:pane;Parameter:}"cmt:b2c9c056-a124-4c86-8b67-467e583f21a2--
<asp:Panel runat="server" ID="pane"cmt:01a89cc7-274f-464f-a235-1e66bcf7f96b--
<asp:Button ID="Button1" runat="server" Text="Button1"cmt:25ce5aca-55c8-4e27-b1f3-36ae941af744--</asp:Button>
<asp:TextBox ID="TextBox1" runat="server"cmt:04da80b9-3daa-426c-8839-61154a396ff0--</asp:TextBox>
</asp:Panel>
</eo:CallbackPanel>
Code: C#
<eo:CallbackPanel runat="server" ID="qwe2" UpdateMode="Conditional" Triggers="{ControlID:Panel1;Parameter:}"cmt:87b7b873-c775-4e35-a1e2-ae959cd5a8c5--
<asp:Panel runat="server" ID="Panel1"cmt:cdb074d4-a218-475c-b50b-7b6a3b484d20--
<asp:Button ID="Button2" Text="Button2" runat="server" />
<asp:TextBox ID="TextBox2" runat="server"cmt:71d2a6a7-3b0a-42c7-bc90-29ce305d9711--</asp:TextBox>
</asp:Panel>
</eo:CallbackPanel>
I try run callback asynchronious:
Code: C#
<asp:Button ID="Button1" runat="server" Text="ButtonCallback" OnClientClick="qwe(); return false;" />
<script type="text/javascript"cmt:a9470859-c8f6-4fef-b966-2d71b11e7316--
function qwe() {
setTimeout("eo_Callback('qwe2', null)", 100);
setTimeout("eo_Callback('qwe1', null)", 1500);
}
</script>
if i set in .cs in OnExecute method Thread.Sleep(xxx); when the result is returned, the elements are displayed simultaneously How can i execute async? Thanks.
|
|
Rank: Advanced Member Groups: Member
Joined: 12/26/2008 Posts: 45
|
Code: JavaScript
function qwe() {
setTimeout("eo_Callback('qwe2', null)", 100);
setTimeout("eo_Callback('qwe1', null)", 1500);
}
|
|
Rank: Advanced Member Groups: Member
Joined: 12/26/2008 Posts: 45
|
In general. I want to have two panels with different content. If one panel will receive information before others, I want it to display, and another panel later.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,343
|
Hi, You can trigger the second one after the first one is done by handling the first CallbackPanel's ClientSideAfterUpdate event: http://doc.essentialobjects.com/library/1/eo.web.callbackpanel.clientsideafterupdate.aspxNote even inside ClientSideAfterUpdate, you should still use setTimeout with a small time out value to trigger the second callback. Do not call eo_Callback inside ClientSideAfterUpdate directly. Thanks!
|
|