|
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:dfe86900-0107-4780-968a-6e54e9dd4957--
<asp:Panel runat="server" ID="pane"cmt:c4f1b5ef-25ee-4bbc-8aaa-0a04849e9794--
<asp:Button ID="Button1" runat="server" Text="Button1"cmt:f59a7e02-983f-49f5-a3b8-d87c4a66f2e4--</asp:Button>
<asp:TextBox ID="TextBox1" runat="server"cmt:f79e611d-af90-4844-abc7-9ebc529da1f2--</asp:TextBox>
</asp:Panel>
</eo:CallbackPanel>
Code: C#
<eo:CallbackPanel runat="server" ID="qwe2" UpdateMode="Conditional" Triggers="{ControlID:Panel1;Parameter:}"cmt:90129aba-01e1-4802-9690-540862f97920--
<asp:Panel runat="server" ID="Panel1"cmt:f17181ee-e2f6-473e-869d-1cea45a92a5e--
<asp:Button ID="Button2" Text="Button2" runat="server" />
<asp:TextBox ID="TextBox2" runat="server"cmt:e374ffec-9e05-44e6-ba40-388959690aec--</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:8cc92379-f35b-4d73-93d1-91aab795d495--
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,384
|
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!
|
|