2012-06-25 53 views
1

我無法使用EXT JS將圖像數據加載到可拖動窗口中。EXT JS將內容圖像數據加載到窗口中

流向圖像文件的進程的鏈接位於代碼中。

我使用

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 
    } 
}); 

然後

plotWin.show(); 

試圖但這似乎並沒有工作。

回答

3

它看起來像那個url是跨域,這意味着它不能通過ajax加載。如果它是一個圖像,爲什麼不嵌入它?

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" 
    } 
}); 
+0

謝謝。這很好。 –

+0

一個問題是src param不會接受像「http://209.105.242.30/custom/webimg?a=4&b=9」這樣的查詢字符串。看着火狐調試器控制檯它只發送?然後一個{。有任何想法嗎? –

+0

這似乎是相關的:http://stackoverflow.com/questions/6672551/extjs-to-django-url-query-parameters –