Search Results

Search found 1 results on 1 pages for 'user3651491'.

Page 1/1 | 1 

  • Get Form Input via Ajax

    - by user3651491
    I have a jqgrid plugin which I call via Ajax. I have index.php and a getGridData.php. How will I pass form input in getGridData.php via ajax and use it in getGridData.php? I tried serialize but I can't pass or access it on getGridData.php. I need it as parameters for mysql. Here's my code. <script language="javascript" type="text/javascript"> function jgGrid() { $(document).ready(function () { $("#grid").jqGrid({ url: "inc/Controller/getGridData.php"+$("#thisForm").serialize(), data : formData, datatype: "json", mtype: "POST", colNames: ["SiteID", "TerminalID", "TransactionType", "Amount", "ServiceStatus"], colModel: [ { name: "SiteID"}, { name: "TerminalID"}, { name: "TransactionType"}, { name: "Amount"}, { name: "ServiceStatus"}, ], pager: "#pager", rowNum: 10, rowList: [10,20], sortname: "SiteID", sortorder: "asc", height: 'auto', viewrecords: true, gridview: true, caption: "" }); }); } </script> getGridData.php include('../Model/Queries.php'); $cardnumber = $_POST['cardnumber']; $transact_type = $_POST['transact_type']; $fromdate = $_POST['fromdate']; $todate = $_POST['todate']; $loyalty = new Queries(); $get_mid = $loyalty->loyaltyConn($cardnumber); $somedata = json_encode($loyalty->nposConn($get_mid, $transact_type, $fromdate, $todate)); echo $somedata;

    Read the article

1