|
|
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:ab0d0852-3895-4ccd-a10a-5566dec9f034--
<asp:Panel runat="server" ID="pane"cmt:a487c847-a0e2-4351-8976-f54e7ea08209--
<asp:Button ID="Button1" runat="server" Text="Button1"cmt:bd3da48a-2a8f-485b-a9d0-091336ef129a--</asp:Button>
<asp:TextBox ID="TextBox1" runat="server"cmt:14f9787d-1cae-435f-b38b-4c4560a6b893--</asp:TextBox>
</asp:Panel>
</eo:CallbackPanel>
Code: C#
<eo:CallbackPanel runat="server" ID="qwe2" UpdateMode="Conditional" Triggers="{ControlID:Panel1;Parameter:}"cmt:985fc90f-aea7-4830-a478-ec1681d2b4ee--
<asp:Panel runat="server" ID="Panel1"cmt:d6347bf7-4d34-47e3-98f4-b91426f62fae--
<asp:Button ID="Button2" Text="Button2" runat="server" />
<asp:TextBox ID="TextBox2" runat="server"cmt:9c6a8abd-e2ef-448e-b4a9-29d3dc6e147b--</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:36c1314a-75a3-478c-bff4-2505ab737f59--
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,468
|
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!
|
|