0
var tempArrayVal = [];
var tempArrayTag = [];
function getParam() {
  var idx = document.URL.indexOf('?');
  var param = {};
  var myBuff = {};
  if(idx != -1) {
    var pairs = document.URL.substring(idx+1,document.URL.length).split('&');
    for(var i = 0; i < pairs.length; i++) {
        nameVal = pairs[i].split('=');
        params[nameVal[0]] = nameVal[1];
        tempArrayTag[i] = nameVal[0];
        tempArrayTag[i] = decodeURIComponent(tempArrayTag[i]);
        tempArrayVal[i] = params[nameVal[0]];
        tempArrayVal[i] = decodeURIComponent(tempArrayVal[i]);
    }
 }
}

I have a dataset into my database and i am trying to display it. It will fetch data successfully and also show the data correctly when rows in table <= 52. when i insert the data number 53 it and getting the data it show an error "Requested Uri is too large". How can i solve it?

chandan
  • 13
  • 3
  • It's the number of characters in your URL, not the number of parameters. See [here](https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers). A simple solution is to use a free URL shortener like tiny.url or goo.gl (but the latter is being phased out within a year or so). A bit more robust and not requiring params would be a GET call to a page containing the data in JSON format, which you could parse and display in the table. – ACHC May 31 '18 at 04:33
  • how to use tiny.url and where i put it into my code? And if i go for GET and JSON then how i do this? please write code for this. – chandan May 31 '18 at 04:52
  • You can do it [like this](https://stackoverflow.com/questions/1111171/how-to-use-jquery-to-produce-tinyurl). Note this requires jquery which you need to import in `` with ` – ACHC Jun 01 '18 at 02:02

0 Answers0