JSONP testing

by molecule

HTML

<link rel="stylesheet" href="http://dev.sencha.com/deploy/ext-4.0.2a/resources/css/ext-all.css">

JavaScript

Ext.define('MovieModel', {
        extend : 'Ext.data.Model',
        fields : [ {
            name : 'Title',
            type : 'string'
        }, 'Plot' ],

        proxy : {
            type : 'jsonp',
            url : 'http://www.imdbapi.com/?y=1969&plot=full',
            reader : {
                type : 'json'
            }
        }
    });

MovieModel.load(123, {
    params:{t: 'True Grit'},
    success: function(record, operation) {
        alert(record.get('Plot'));
    }
});