2013-08-26 59 views
0

我有一個複選框網格和一個按鈕。 當你按下按鈕,我想插入選定的行數據到我的分貝。插入數據到db

複選框的一部分我成功了,我得到的行,但我不能形象豪特如何插入數據到我的分貝。

我知道這是非常簡單的東西,但我堅持了幾天,不能從文檔或谷歌中找出它。

var temp = ''; 
for (i=0; i<=checkboxSelection.length-1; i++){ 
    temp = temp + checkboxSelection[i].get('vendor_name') + ","; 
} 
alert(temp); 

這是我的商店:

var v_url = 'GetBiddingRows.jsp'; 
store: Ext.create('Ext.data.Store', { 
       fields:[ 
       {name: 'stat_data', type: 'Date' , sortType: 'asDate', format: 'Y-m-d h:M:s'}, 
       {name: 'operator_desc'}, 
       {name: 'vendor_name'}, 
       {name: 'currency'}, 
       {name: 'rate', type: 'float', sortType: 'asFloat'} 
       ], 
       proxy: { 
        type: 'ajax', 
        timeout: 120000, 
        url: v_url, 
        reader: { 
         type: 'json', 
         root: 'data', 
         successProperty: 'success' 
        } 
       }, 
       autoLoad: true 
      }), 

我如何通過VAR溫度到GetBiddingRows.jsp?

回答

3

您可以將其發送給使用Ajax請求的服務器:

Ext.Ajax.request({ 
    url: 'foo', 
    params: { 
     vendors: temp 
    } 
}); 
+0

同意你的觀點,但你可能會忘記添加「方法:‘郵報’」在你的代碼 – So4ne

+0

我嘗試發送該AJAX,我可以看到它調用了GetBiddingRows.jsp,但是如何從GetBiddingRows.jsp中獲取數據? – susparsy

+0

它將作爲表單發送。 –