Get current url including Jqgrid options

I am looking to get the full URL of the last request of my ajax service made by JqGrid, including page, page entries, search options, etc.

Is there any method or set of methods in the JqGrid api that I can use to achieve this?

+5
source share
3 answers

jqGrid does not save somewhere full URL added with all parameters. Therefore, it is not possible e in the jqGrid API archive.

URL-, Firebug, Fiddler .

, , URL. , HTTP GET (mtype: "GET"). URL- HTTP GET.

URL- GET :

URL:

  • BaseUrl _search = &? = 1250348761396 & = 20 & = 1 & sidx = & Sord =
  • BaseUrl _search = &? = 1250348761396 & = 20 & = 1 & sidx = & Sord =
  • baseurl? _search = true & rows = 10 & page = 1 & sidx = & sord = asc & searchField = & searchString = Micro & searchOper = bw

url , 20 , . URL- Name. URL- ( ) "Manufacture Micro" Name. 10 .

, URL . Everithing unter http://www.trirand.com/jqgridwiki/doku.php?id=wiki:jqgriddocs. , .

, , URL, . , cunstruct url

"baseUrl?firstName=" + myFirstName + '&lastName=' + myLastName

encodeURIComponent myFirstName myLastName. jQuery.param (. Internet explorer) postData jqGrid (. jqgrid jqGrid NOT, /. "?" "&" url, , encodeURIComponent.

+8

:

var myUrl = jQuery("#grid").jqGrid('getGridParam', 'url');
myUrl += "?myextraparam=something";
var postData = jQuery("#grid").jqGrid('getGridParam', 'postData');
$.each(postData, function(key, value) {
  myUrl += "&"+key+"="+encodeURIComponent(value);
});
//alert(myUrl);

, , , . ?myextraparam=something , .

+5

Here is a simple answer. JQGrid will add your query strings.

url: "/CaseManagement/Shipping/GetLastShipments?StudentID=" + GetSelectedStudentID(),
0
source

All Articles