PDA

View Full Version : Tabpanel item with autoLoad params not always POSTing params in IE



cgi-bin
28 Jul 2011, 9:23 AM
I have a page with a tab panel... in that tab panel is an item with an autoLoad:{} object set. In the autoLoad, I am passing a params:{} object.

It seems that in Internet Explorer (version 6 & 7, and maybe sometimes 8), that the parameters are not being sent with the request.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>TEST</title>
<!-- Style Sheets -->
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<link rel="stylesheet" type="text/css" href="/css/ExtJS/ext-all.css" />

<!-- JavaScript Libraries -->
<script type="text/javascript" src="/js/ExtJS/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="/js/ExtJS/ext-all.js"></script>

<script type="text/javascript">
Ext.onReady
(
function()
{
Ext.BLANK_IMAGE_URL = '/img/ExtJS/default/s.gif';

var mainPanel = new Ext.TabPanel
({
id:'main-tabs',
region:'center',
enableTabScroll:true,
deferredRender:false,
monitorResize:true,
activeTab:0,
defaults:
{
layout:'fit',
monitorResize:true,
closable:true,
autoScroll:true
},
items:
[
{
id:'tabs_welcome',
autoLoad:
{
url:'/test/welcome.php',
method:'POST',
scripts:true,
params:
{
tab_id:'tabs_welcome'
}
},
title:'Welcome',
closable:false
}
]
});

var viewport = new Ext.Viewport
({
layout:'border',
items:
[
mainPanel
]
});
}
);
</script>
</head>
<body>
<!-- nothing -->
</body>
</html>

The /test/welcome.php is just a dummy script:
<?php
error_log('/test/welcome.php:' . print_r($_POST, true));
?>
<script>
alert('Welcome: "<?php echo @$_POST['tab_id']; ?>"');
</script>

Every once in a while it works... but I'd say 99% of the time it doesn't. Server logs are showing code 200 responses (so not a cache issue (on the SERVER side?)).

I have never had an issue with FireFox... only IE... and maybe older versions... could be combination of browser and base os... I have a limited number of machines to test with...
Windows Server 2003 + IE 6.0.3790.3959 (sp2) = Doesn't Work
Windows Server 2003 (SP2) + IE 7.0.5730.11 = Doesn't Work (worked very rarely)
Windows XP + IE 8.??? = Doesn't Work (one specific machine... didn't have others to test)
Windows Server 2008 + IE 7.0.6001.18000 = Doesn't Work (worked very rarely)
Windows Server 2008 (64bit/SP1) + IE 7.0.6001.18000 = Doesn't Work
Windows 7 + IE 8.0.7600.16385 = works
Windows 7 + IE 8.0.7600.16385 (IE7 Mode) = works

Firefox has always worked (its the browser I develop with). Chrome seems to work (not extensively tested)

If I change the autoLoad.method to 'GET' and change the server script accordingly, it seems to work correctly.

Is this a BUG? is there some work-around for posts to work? It seems like older versions of IE are doing some internal caching (even though I am seeing the requests hit the server every time... just with empty POST stings). I even tried adding a bunch of dummy text to the response because I remember an old IE caching issue if the response size was below a certain threshold... didn't have any effect.

cgi-bin
28 Jul 2011, 9:55 AM
Forgot to mention this is in 3.4.0, but was also occurring in 3.3.x.