title: Issue with jqGrid and jquery next and previous click event
body: <p>I am trying to click on the next button but it doesn't work, it happens only when i click on the search button and he result appears from the first page, but then wen i click on the next page button it doesn't work can anyone please help: the code is below:</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
              var initGridUri = '&lt;%=request.getContextPath()%&gt;/searchNodeAlerts.action?rand=&lt;%=rand%&gt;';
              var qs = window.location.search.substring(1);
              var qsArray = qs.split('&amp;');
              var qsSearch;
              var qsKeyword;
              var qsSource;
              var s;
              for (i=0;i&lt;qsArray.length;i++) {
                  var cs = qsArray[i].split('=');
                  if (cs[0] == 'as'){
                      qsSearch = cs[1];
                  } else if (cs[0] == 'k'){
                      qsKeyword = cs[1];
                  } else if (cs[0] == 'sn'){
                      qsSource = cs[1];
                  }
              }
  
          myStack = new Array();
          $(document).ready(function(){
              if (qsSearch == 'true'){
                  initGridUri = '&lt;%=request.getContextPath()%&gt;/searchNodeAlerts.action?rand=&lt;%=rand%&gt;&amp;keyword='+ qsKeyword +'&amp;sourceNumber='+ qsSource;
              }
  
              $("#workspace").tabs(); 
              $("#bin-search-submit").live('click',function(){nodeSearchSubmit()})
              $("#bin-search-reset").click(function(){binSearchReset()});
  
              $("#bin-search-publish-start, #bin-search-publish-end").datepicker();
              $("#bin-advanced-search").toggle(
                  function(){
                      $("#bin-search").animate({height:435}, 500);
                      $(this).removeClass('ui-icon ui-icon-arrowstop-1-s');
                      $(this).addClass('ui-icon ui-icon-arrowstop-1-n');
                  },
                  function(){
                      $("#bin-search").animate({height:110}, 500);
                      $(this).removeClass('ui-icon ui-icon-arrowstop-1-n');
                      $(this).addClass('ui-icon ui-icon-arrowstop-1-s');
                  }   
              )
  
              $("#bin-search-source").change(function(){binSearchSource(this)})
  
              $("#refGrid").jqGrid({ 
                  jsonReader : {
                      root: "serachResultList",
                      page: "page",
                      total: "total",
                      records: "records",
                      repeatitems: false
                  },
                   datatype: function(postdata) {
                      jqGridDataRequest(initGridUri, postdata, "refGrid",'onGridLoadComplete()')
                  },
                  &lt;sh:hztClientPref reverse="false" prefname="RELATED_ALERTS" value="Enabled"&gt;
                      colNames:['Actions','Recall #','Title', 'Source', 'Source No','Date','Status','RefID', 'Related'], 
                  &lt;/sh:hztClientPref&gt;
                  &lt;sh:hztClientPref reverse="false" prefname="RELATED_ALERTS" value="Disabled"&gt;
                      colNames:['Actions','Recall #','Title', 'Source', 'Source No','Date','Status','RefID'], 
                  &lt;/sh:hztClientPref&gt;
                  colModel:[                      
                      {name:'act',index:'act', width:85, sortable:false},
                      {name:'hztNumber',index:'hztNumber', width:80, sortable:true}, 
                      {name:'title',index:'title', width:205, formatter:newLine}, 
                      {name:'source',index:'source', width:50, sortable:true}, 
                      {name:'sourceAlertNumber',index:'sourceAlertNumber', width:55, sortable:false}, 
                      {name:'receivedDate', index:'receivedDate', width:70, formatter:newDate, sortable:true}, 
                      {name:'status',index:'status', width:50, sortable:false},
                      {name:'refId',index:'refId', hidden:true},
                      &lt;sh:hztClientPref reverse="false" prefname="RELATED_ALERTS" value="Enabled"&gt;
                          {name:'relatedAlertPresent',index:'relatedAlertPresent', hidden:true}
                      &lt;/sh:hztClientPref&gt;
                  ], 
                  rowNum:20,
                  height:'auto',
                  viewrecords: true,
                  pgbuttons: true,
                  sortname: 'receivedDate',   
                  sortorder: 'desc', 
                  pager: '#refPager',
                  multiselect: true
  
              })
          });
  
          function nodeSearchSubmit(){
  
              var keyword = $('input[name=keyword]');
              var title = $('input[name=title]');
              var sourceNumber = $('input[name=sourceNumber]');
              var startReceiveDate = $('input[name=startReceiveDate]');
              var endReceivedate = $('input[name=endReceiveDate]');
              var source = $('select[name=source]');
              var status = $('select[name=status]');
              var recallNo = $('input[name=recallNo]');
              var page = $('page');
  
              var data = 'keyword='+  keyword.val() +'&amp;title='+ title.val() +'&amp;sourceAlertNumber='+ sourceNumber.val() +'&amp;startReceiveDate='+ startReceiveDate.val() 
                          +'&amp;endReceiveDate='+ endReceivedate.val() +'&amp;source='+ source.val() + '&amp;status='+status.val() + '&amp;hztNumber='+recallNo.val();
  
              var request = '&lt;%=request.getContextPath()%&gt;/searchNodeAlerts.action?rand=&lt;%=rand%&gt;&amp;page=1&amp;'+ data;
  &lt;%=rand%&gt;' + data;
  
              initGridUri = request;        
              jQuery("#refGrid").trigger("reloadGrid")
  
          }
  </code></pre>