title: How to pass URI having parameter values with space? in jqgrid
body: <p>Main grid code is below</p>
  
  <pre><code>$(document).ready(function () {
      jQuery("#list5").jqGrid({
          url: 'server.php?mode=getBaseList',
          datatype: "json",
          colNames: ['Inv No', 'Date', 'Client', 'Amount', 'Tax', 'Total', 'Notes'],
          colModel: [{
              name: 'id',
              index: 'id',
              width: 55
          }, {
              name: 'invdate',
              index: 'invdate',
              width: 90
          }, {
              name: 'name',
              index: 'name',
              width: 100
          }, {
              name: 'amount',
              index: 'amount',
              width: 80,
              align: "right"
          }, {
              name: 'tax',
              index: 'tax',
              width: 80,
              align: "right"
          }, {
              name: 'total',
              index: 'total',
              width: 80,
              align: "right"
          }, {
              name: 'note',
              index: 'note',
              width: 150,
              sortable: false
          }],
          rowNum: 10,
          jsonReader{
           id:'id',repeatitems:false
          },
          rowList: [10, 20, 30],
          pager: '#pager5',
          sortname: 'name',
          autoencode: true,
          loadonce:true,
          sortable: true,
          viewrecords: true,
          sortorder: "desc",
          multiselect: false,
          subGrid: true,
          subGridRowExpanded: function(subgrid_id, row_id) { 
          var newID = $('#list5').getCell(row_id, 'id');
          var escapeID=escape(newID);
  
          var subgrid_table_id, pager_id; 
          subgrid_table_id = subgrid_id+"_t"; 
          pager_id = "p_"+subgrid_table_id; 
          $("#"+subgrid_id).html("&lt;table id='"+subgrid_table_id+"' class='scroll'&gt;&lt;/table&gt;&lt;div id='"+pager_id+"' class='scroll'&gt;&lt;/div&gt;"); 
          jQuery("#"+subgrid_table_id).jqGrid({ 
          url:"/portal/getSubGridData?id="+escapeID, 
          datatype: "json", 
          colNames: ['No','Item','Qty','Unit','Line Total'], 
          colModel: [ 
          {name:"num",index:"num",width:80,key:true}, 
          {name:"item",index:"item",width:130}
          ], 
          rowNum:20, 
          pager: pager_id, 
          sortname: 'num', 
          sortorder: "asc", 
          height: '100%' 
          }); 
          jQuery("#"+subgrid_table_id).jqGrid('navGrid',"#"+pager_id,{edit:false,add:false,del:false}) }
          caption: "Simple data manipulation"
      }).navGrid("#pager5", {
          edit: false,
          add: false,
          del: false
      });
  });
  jQuery("#list5").jqGrid('filterToolbar',{searchOperators : true});
  </code></pre>
  
  <p>How to pass URI having parameter values with space? I observe that '%20' or '_' is cancelled out in the JS. What should I do?</p>
  
  <p><strong>I tried :</strong>
  <strong>Step 1 : using id</strong></p>
  
  <pre><code>id=10054898 104143018
  
  var modifiedUrl=escape(id);
  </code></pre>
  
  <p><strong>New url as below</strong></p>
  
  <p>my url is below</p>
  
  <pre><code>newUrl=/portal/getSubGridData?id=10054898%20104143018
  </code></pre>
  
  <hr>
  
  <p><strong>Step 2: using name</strong></p>
  
  <pre><code>name=John Williams
  
  var modifiedUrl=escape(name);
  </code></pre>
  
  <p><strong>New url as below</strong></p>
  
  <p>my url is</p>
  
  <pre><code>newUrl=/portal/getSubGridData?name=John%20Williams
  </code></pre>
  
  <hr>
  
  <p>Above url not post to server side, i have checked the firebug. The url not getting submitted. </p>