PDA

View Full Version : [CLOSED] Error using AutoLoad in panel



Jurke
Sep 11, 2008, 7:58 AM
Hi
I have a Panel inside a Windows that I want to load a different page in, but it generates an error? Visual studio breaks in debug mode and saya "htmlfile: Unknown runtime error" and this code in highlighted in the debugfile.
Im using version 0.6



this.dom.innerHTML=html


This is my code





<ext:Window ID="wdn1" Width="600" Height="300" Modal="true" runat="server" Showonload="false" Collapsible="false" Icon="Application"


Title="Alter charter" >


<Content>


<ext:Panel AutoLoad="NewPage.aspx" AutoHeight="true" ID="pnlChangeCharter" runat="server" Collapsible="True" BodyBorder="false" Border="False" Title="Charter" Header="false" AutoScroll="True" Collapsed="false">





</ext:Panel>





</Content>


</ext:Window>


Any ideas?

Best regards
Mikael Jürke

Vladimir
Sep 11, 2008, 8:02 AM
Hi Mikael,

try to set full path for AutoLoad property. It forces iframe creation



Panel1.AutoLoad = new Uri(HttpContext.Current.Request.Url, "NewPage.aspx").ToString();


Let me know about results

Jurke
Sep 11, 2008, 8:55 AM
Hi

I tried to put the code you suggested in the page load. But it results in an other runtime error, Visual Studio halts on this code:






setTimeout(function () {
if (result.script &amp;&amp; result.script.length > 0) {
eval(result.script);
}


if (requestConfig.success) {
requestConfig.success(response, result, control, type, action, userParams);
}


}, delay);


Best regards
Mikael Jürke

Vladimir
Sep 11, 2008, 9:05 AM
It seems that you try to set AutoLoad during AjaxEvent. If you no need this please wrap AutoLoad setting to



if(!Ext.IsAjaxRequest)
{
Panel1.AutoLoad = new Uri(HttpContext.Current.Request.Url, "NewPage.aspx").ToString();
}


I'll investigate AutoLoad behaivor during AjaxEvent and let you know about results

Jurke
Sep 11, 2008, 9:15 AM
Thank you, right on the spot. It now works if I dont do it during AjaxEvent.

Best regards
Mikael