Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
how to get thefull url that reads my data from the server?
Tags: urljqgrid
17/03/2011
08:51
Avatar
jay.ann
New Member
Members
Forum Posts: 1
Member Since:
17/03/2011
sp_UserOfflineSmall Offline

hi, I am looking to get the full url of the last request  made by JqGrid, including page, records per page, search params etc.

Is there any method or collection of methods within the JqGrid api I can use to achieve this? i want to display the full url location/path in my html and also, i want to get it's response body. is there anybody here who knows how to do this?

17/03/2011
16:08
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

You can for example do following

var mygrid = $('#list');
mygrid.jqGrid({
    // all parameters which you currently use
    ajaxGridOptions: {
        beforeSend: function(jqXHR, settings) {
            var ts = mygrid[0];
            if (console && console.log) {
                console.log ("ajax with URL: " + settings.url);
            }
            // now do the same what do beginReq() of jqGrid
            // the code below can be simplified in your case
            // corresponds to loadui and loadBeforeSend which you use
            ts.grid.hDiv.loading = true;
            switch(ts.p.loadui) {
                case "disable":
                    break;
                case "enable":
                    $("#load_"+ts.p.id).show();
                    break;
                case "block":
                    $("#lui_"+ts.p.id).show();
                    $("#load_"+ts.p.id).show();
                    break;
            }
            if($.isFunction(ts.p.loadBeforeSend)) { ts.p.loadBeforeSend.call(ts,xhr); }
        }
    }
); 

The call of console.log you can replace any other methods depend on where and in which form you can have the information.

Best regards
Oleg 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
24 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information