PDA

View Full Version : [FIXED] [V0.8.0] A bug of url nocache setting.



Tom.Hanks
Dec 30, 2008, 12:59 AM
below code seems normal for load a sepcify url by panel dynamicly.
but the nocache property will lead to a problem!
when we set a url = 'a.aspx?id=1' by script dynamicly, then the url will become just like 'a.aspx?id=1?20081230'!



<script language='javascript'>
//demo code:
var pnl = Ext.get('<%=this.pnlMainFrame.ClientID%>');
pnl.load('a.aspx?id=1');
</script>
<ext:Panel ID="pnlMainFrame" runat="server" Border="true" Header="false" BodyStyle="background-color:white;">
<AutoLoad Url="../pages/main.aspx" Mode="IFrame" ShowMask="true" NoCache="true">
<ext:Panel>


below is my solution:
coolite-core.js


loadIFrame: function(config) {
var al = this.getAutoLoad(), url;


if (typeof config == "string") {
al.url = config;
} else if (typeof config == "object") {
Ext.apply(al, config);
}


url = al.url;


if (al.nocache == true) {
//before
//url = url + "?" + new Date().getTime();
//now:
if(url.indexOf("?") > -1)
url = url + "&amp;" + new Date().getTime();
else
url = url + "?" + new Date().getTime();

}

Vladimir
Dec 30, 2008, 6:25 AM
Hi,

Thanks for pointing out this bug. We will fix it.