2010-09-26 91 views
1

我感到困惑我如何將鏈接添加到下面的代碼的URL幫助與添加HREF

onReady: function() { 
    new Ext.TabPanel({ 
     fullscreen: true, 
     type: 'dark', 
     sortable: true, 
     items: [{ 
      title: 'Tab 1', 
      html: '1', 
      cls: 'card1' 

能夠直接加載一個URL時,我點擊選項卡1.此代碼是從sencha觸摸模板。我希望htm部分能夠在選擇該選項卡時加載URL。謝謝

回答

1

您可以使用autoLoad config option爲此。

你可以試試,

onReady: function() { 
new Ext.TabPanel({ 
    fullscreen: true, 
    type: 'dark', 
    sortable: true, 
    items: [{ 
     title: 'Tab 1', 
     autoLoad : { 
         url :youryrl, 
         scripts:true, 
         callback: function(){ yourcallbackfunction(); } 
        }, 

詳細的文檔,請

http://examples.extjs.eu/

http://dev.sencha.com/deploy/dev/docs/

http://dev.sencha.com/deploy/ext/docs/output/Ext.TabPanel.html

http://www.sencha.com/learn/Tutorial:TabPanel_Basics

希望這會有所幫助。

+0

我沒有真正找到除了第二個文檔之外的任何autoLoad的適當用法。你是否介意如何使用它? – 2010-09-26 11:34:05

+0

我編輯了我的答案,請現在檢查它。另外,我添加了extjs文檔鏈接。 – Nik 2010-09-26 11:53:07

+0

在我的項目中,我會使用自動加載:'網址'或我需要說autoLoad'網址:www.google.com' – 2010-09-26 12:08:32