1

I'm having trouble loading image data into a draggable window using EXT JS.

The link to a process that streams the image file is in the code.

I've tried using

var plotWin = Ext.create('Ext.Window', {
    title: 'Plot',
    width: 600,
    height: 400,
    x: 10,
    y: 200,
    loader : {
                url : "http://209.105.242.30/custom/webimg",
                autoLoad : true,
                renderer : 'data'
            },
    plain: true,
    headerPosition: 'top',
    layout: 'fit',
    items: {
        border: false
    }
});

and then

plotWin.show();

But this does not seem to work.

anti_ml
  • 481
  • 4
  • 15

1 Answers1

3

It looks like that url is cross domain, which means that it's not going to be able to load via ajax. If it's an image, why not just embed it?

var plotWin = Ext.create('Ext.Window', {
    title: 'Plot',
    width: 600,
    height: 400,
    x: 10,
    y: 200,
    plain: true,
    headerPosition: 'top',
    layout: 'fit',
    items: {
        xtype: 'image',
        src: "http://209.105.242.30/custom/webimg"
    }
});
Evan Trimboli
  • 29,900
  • 6
  • 45
  • 66
  • One issue is the src param won't accept a query string like "http://209.105.242.30/custom/webimg?a=4&b=9". looking at the firefox debugger console it only sends the ? an then a {. Any ideas? – anti_ml Jun 27 '12 at 00:32
  • this appears to be related: http://stackoverflow.com/questions/6672551/extjs-to-django-url-query-parameters – anti_ml Jun 27 '12 at 00:50