i find an error in ie browser about this tutorial.
Thanks for taking the time to do and share the tutorial.
However, if you run this tutorial in Explorer (yes!, I'm afraid some people do use it ;-) ) then will not work as the toSource() method used in the dd function is not supported.
toSource does not work in IE. You need to use Ext.util.JSON.encode(data).
Thanks to http://curisu.wordpress.com/2008/09/29/javascript-tosource-in-ie67/
Just change the code as follows:
// container 1
var dd11 = Ext.get('dd1-item1');
dd11.dd = new Ext.dd.DDProxy('dd1-item1', 'group', {
dragData:{name:'Item 1.1',index:1},
scope:this,
fn:function(dd, data) {
//alert(data.toSource());
var myVar = Ext.util.JSON.encode(data);
alert(myVar);
}
});
var dd12 = Ext.get('dd1-item2');
dd12.dd = new Ext.dd.DDProxy('dd1-item2', 'group', {
dragData:{name:'Item 1.2',index:2},
scope:this,
fn:function(dd, data) {
//alert(data.toSource());
var myVar = Ext.util.JSON.encode(data);
alert(myVar);
}