ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: sam.shah on May 15, 2018, 06:26:47 am

Title: Uncaught ReferenceError: o is not defined in console
Post by: sam.shah on May 15, 2018, 06:26:47 am
Why am I getting this error in the console of chrome?

pqgrid.dev.js:4590 Uncaught ReferenceError: o is not defined
    at t.paramquery.cRefresh.onWindowResize (pqgrid.dev.js:4590)
    at dispatch (jquery-3.1.1.min.js:5207)
    at elemData.handle (jquery-3.1.1.min.js:5015)
    at Object.trigger (jquery-3.1.1.min.js:8202)
    at jquery-3.1.1.min.js:8270
    at Function.each (jquery-3.1.1.min.js:362)
    at jQuery.fn.init.each (jquery-3.1.1.min.js:157)
    at jQuery.fn.init.trigger (jquery-3.1.1.min.js:8269)
    at HTMLBodyElement.<anonymous> (pqgrid.dev.js:4479)
    at pqgrid.dev.js:218
Title: Re: Uncaught ReferenceError: o is not defined in console
Post by: paramvir on May 16, 2018, 09:43:41 am
Could you please mention the steps or a jsfiddle to reproduce the error.
Title: Re: Uncaught ReferenceError: o is not defined in console
Post by: qcdatabase.com on May 29, 2018, 07:39:57 am
Hey, You guys did a great job with this grid system. I have tested and/or bought a few others but this is the best one by far.
I had the same issue as user sam.shah. I have the Paramquery Pro evaluation version I downloaded about a week ago. Still learning the API.
Here is my chrome console log and my script for initiating my table (embedded in PHP so ignore the escaped single quotes).
// chrome console log
Uncaught ReferenceError: o is not defined...........................................pqgrid.min.js:4590
    at t.paramquery.cRefresh.onWindowResize (pqgrid.min.js:4590)
    at dispatch (jquery.min.js:3)
    at v.handle (jquery.min.js:3)
    at Object.trigger (jquery.min.js:3)
    at jquery.min.js:4
    at Function.each (jquery.min.js:3)
    at init.each (jquery.min.js:3)
    at init.trigger (jquery.min.js:4)
    at HTMLBodyElement.<anonymous> (pqgrid.min.js:4479)
    at pqgrid.min.js:218

// my script
$(function () {
   $.get(\'grid_json.php\',function(data,status){
      var obj = {
         numberCell:{resizable:true,title:"#",width:30,minWidth:30},
         editable: true,
         editor: {type: \'textbox\'},
         title: "'.$this->tableTitle.'",
         resizable:true,
         virtualX: true,
         virtualY: true,
         hwrap: false,
         wrap: false,
         toolbar: {
            items: [
            {
               type: \'select\',
               label: \'Format: \',               
               attr: \'id="export_format"\',
               options: [{ xlsx: \'Excel\', csv: \'Csv\', htm: \'Html\', json: \'Json\'}]
            },
            {
               type: \'button\',
               label: "Export",
               icon: \'ui-icon-arrowthickstop-1-s\',
               listener: function () {
                  var format = $("#export_format").val(),                           
                     blob = this.exportData({format: format,render: true});
                  if(typeof blob === "string"){                           
                     blob = new Blob([blob]);
                  }
                  saveAs(blob, "QC Database '.$this->tableTitle.' partial export."+ format );
               }
            }]
         },
         filterModel: { on: true, mode: "AND", header: true },
         colModel:  '.$this->colModel.',
         dataModel: {
                     data: JSON.parse(data),
                     location: "remote",
                     sorting: "local",
                     paging: "local",
                     dataType: "JSON",
                     method: "GET",
                     curPage: 1,
                     rPP: 100000,
                     sortIndx: 1,
                     sortDir: "up",
                     getUrl: function () {
                        return { url: "grid_json.php" }
                     },
                     getData: function (dataJSON) {
                        return { data: dataJSON };               
                     }
                  }
      };
      
      /* paramquery init */
      var $grid = $("#grid_container").pqGrid(obj); 
      
   }).always(function(){
      $("#grid_container").pqGrid("refresh");
   });
});
Title: Re: Uncaught ReferenceError: o is not defined in console
Post by: paramvir on May 29, 2018, 10:57:22 pm
Please try this patch ( to be included after pqgrid.min.js )
Title: Re: Uncaught ReferenceError: o is not defined in console
Post by: qcdatabase.com on May 30, 2018, 12:19:07 am
That worked. Thanks for the quick response!