|
|
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:e3fc843b-7e73-4139-b772-75ae0ee39d13--
<asp:Panel runat="server" ID="pane"cmt:000a3ad2-cfb6-45a9-ba83-24c375a64de2--
<asp:Button ID="Button1" runat="server" Text="Button1"cmt:5fb138f0-4a92-4a75-98b5-ce01a577d795--</asp:Button>
<asp:TextBox ID="TextBox1" runat="server"cmt:560a0dfd-21b1-4197-9cee-6cd01ee048dc--</asp:TextBox>
</asp:Panel>
</eo:CallbackPanel>
Code: C#
<eo:CallbackPanel runat="server" ID="qwe2" UpdateMode="Conditional" Triggers="{ControlID:Panel1;Parameter:}"cmt:8d68cc9c-093d-4e01-8700-63a5db48d42f--
<asp:Panel runat="server" ID="Panel1"cmt:3a4dc135-9dca-4315-8823-fc29a912b25f--
<asp:Button ID="Button2" Text="Button2" runat="server" />
<asp:TextBox ID="TextBox2" runat="server"cmt:66e1a250-8e2d-4dda-a5d5-da9a7a91297d--</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:dabc9e9b-0ed5-46a9-9361-945c224f76d3--
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,423
|
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!
|
|