• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
paging on popup dialog --> how to refresh

#2
I have tried below: But it failed. no action when click on paging --------------------//

//----- Below jquery function for being called when click on the paging below --------------//
Code:
function getApproveList(ctrlValue1, ctrlValue2, ctrlName, ctrlErrName) {
    $("#".concat(ctrlName)).html('<img alt="loading..." src="<?php echo base_url();?>assets/img/loading.gif">');
    $.ajax({
        method: "POST",
        url: "<?php echo base_url(); echo MY_PATH;?>Item/getHtmlList",
        data: { postID: 20, //$( "#".concat(ctrlValue1) ).val(),
            pageNum: 2}, //$( "#".concat(ctrlValue2) ).val()},
        success: function(response){
            var result;
            try{
            alert("1234");
            result=JSON.parse(response);
            }catch(err){
                alert(err.message);
            }
            $("#".concat(ctrlName)).html(result.icon);
            $("#".concat(ctrlErrName)).html(result.message);
            }
    });
};

//---------Paging code in controller Item of function getHtmlList---------------------------------//
Code:
$outputhtml=$outputhtml."<input type=\"hidden\" id=\"ctrlpageNum\" name=\"ctrlpageNum\" value=\"$pageNum\"/>";
                $outputhtml=$outputhtml."<input type=\"hidden\" id=\"ctrlpageNum2\" name=\"ctrlpageNum2\" value=\"$pageNum2\"/>";
                
                $outputhtml=$outputhtml."<li  class=\"active\"><a id=\"hrefPageNum\" href=\"#\" onclick=\"getApproveList(\"ctrlpostID\", \"ctrlpageNum\", \"tableBodyList\", \"tableBodyError\"); return false;\">$pageNum</a></li>";
                $outputhtml=$outputhtml."<li><a id=\"hrefPageNum2\" href=\"#\"  onclick=\"getApproveList(\"ctrlpostID\", \"ctrlpageNum2\", \"tableBodyList\", \"tableBodyError\"); return false;\">$pageNum2</a></li>";
Reply


Messages In This Thread
RE: paging on popup dialog --&gt; how to refresh - by rchiu5hk - 03-09-2016, 08:59 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.