|
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:388021c5-6699-4302-8046-08e6b6e5252a--
<asp:Panel runat="server" ID="pane"cmt:2ccc637f-9678-4783-8c43-f724c679bc6b--
<asp:Button ID="Button1" runat="server" Text="Button1"cmt:03624b23-3b84-4a35-bd85-7ab593884d87--</asp:Button>
<asp:TextBox ID="TextBox1" runat="server"cmt:d8b9f670-a82b-44a5-abd4-b8227c35acde--</asp:TextBox>
</asp:Panel>
</eo:CallbackPanel>
Code: C#
<eo:CallbackPanel runat="server" ID="qwe2" UpdateMode="Conditional" Triggers="{ControlID:Panel1;Parameter:}"cmt:0b9107b7-7073-4b05-a853-ef0d54807b2c--
<asp:Panel runat="server" ID="Panel1"cmt:f94dac20-b6dc-4d2c-a3a9-10bf3cb1be72--
<asp:Button ID="Button2" Text="Button2" runat="server" />
<asp:TextBox ID="TextBox2" runat="server"cmt:effae6af-0db9-4a60-a2e1-d070c953c64a--</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:c63be9d5-72d9-4f1a-bc91-91fb2d53ef1e--
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,386
|
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!
|
|