PDA

View Full Version : [FIXED][3.0][DUP] Ajax requests break when passing 0 or false



flylaputa
29 Apr 2009, 7:59 AM
When doing an Ext.Ajax.request any params that have the value 0 or false are converted to "".



<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../ext-3.0-rc1/resources/css/ext-all.css">
<script type="text/javascript" src="../../../ext-3.0-rc1/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../../../ext-3.0-rc1/ext-all-debug.js"></script>
<title id="page-title">Title</title>
<script type="text/javascript">
Ext.BLANK_IMAGE_URL = '../../../ext-3.0-rc1/resources/images/default/s.gif';
Ext.onReady(function() {
Ext.Ajax.request({
url: 'urlToServlet',
method: 'POST',
params: {'position': 0},
success: function (response) {
alert('success');
},
failure: function () {
alert("faiure");
}
});

});
</script>
</head>
<body style="margin:40px">
</body>
</html>

evant
29 Apr 2009, 8:12 AM
http://extjs.com/forum/showthread.php?p=322695#post322695

flylaputa
29 Apr 2009, 8:50 AM
Great, thank you.