English 中文(简体)
解决在输电中选择jqGrid囚室的问题,并将之送往服务器
原标题:problem selecting jqGrid cell on rowSelect and sending them to server

当我使用浏览器和发送第1和2栏的数值时,它不提供为第二行选定的数值......而只是寄出第1栏的全部价值,而不是第2栏。 ......

我的做法:

jQuery("#viewt").click( function(){

    var grid = jQuery("#inventoryInq");
    var ids =grid.jqGrid( getGridParam , selarrrow );
    if (ids.length>0) {
        var names = [];
        for (var i=0, il=ids.length; i < il; i++) {
            var name = grid.jqGrid( getCell , ids[i],  sku );
            names.push(name);
        }

        $.ajax({
            type: "POST",
            url: "/cpsb/transactionHistory.do",
            data:{
                method:"getTransactionHistory",
                lpn:JSON.stringify(ids),
                sku:JSON.stringify(name)
            },
            dataType: "json",
            success: function(msg){
                alert(msg);
            }

        });
    }

});

我为第1栏确定了关键参数。

更新:1

 jQuery("form#viewform").submit( function(){

         var grid = jQuery("#inventoryInq");
         var id =grid.jqGrid( getGridParam , selrow );
           if (id) { 
             var ret = grid.jqGrid( getRowData ,id);
             } 

             url:"/cpsb/transactionHistory.do?method=getTransactionHistory&lpn="+ret.licensePlateNumber+"&sku="+ret.sku;  


          });
最佳回答

在我看来,你的错误非常容易:你应替换<条码>JSON.stringification(姓名)至JSON.stringification(姓名)

问题回答

暂无回答




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签