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_TopicIcon
Check the data AFTER an ajax call.
23/01/2010
01:59
Avatar
bobnelson0
New Member
Members
Forum Posts: 1
Member Since:
23/01/2010
sp_UserOfflineSmall Offline

I'm new to jqGrid and I've been looking through documentation to try to find a solution to my problem.

My jqGrid makes an ajax request to a php file protected by an ACL mechanism. This works fine, however, it is possible that the PHP session can expire. So next time the user tries to refresh the results, I get back the html for the login page.

My question is this, is there a way for me to check the data AFTER the ajax call is made. I have set up my PHP to send back json in the form of "{sessionExpired: true}" when the users tries to access this page with an expired session. I want to be able to check for that condition and handle it properly. With jQuery's ajax, I'd use the success event, but I can't seem get anything like that to work for jqGrid.

Any ideas?

23/01/2010
14:32
Avatar
Les
Member
Members
Forum Posts: 44
Member Since:
11/12/2009
sp_UserOfflineSmall Offline

You can use datatype as function to check the data.  See this example:

http://www.trirand.com/blog/?p.....s-subgrid/

23/01/2010
17:54
Avatar
ram2010
Member
Members
Forum Posts: 43
Member Since:
13/01/2010
sp_UserOfflineSmall Offline

So taking this on forward to the jquery plugin for struts. When making a call via the grid, how can this be done?

I see there is an attribute on sj:grid called onErrorTopics, do I use this & if so how can I?

The struts2 jquery showcase is fantastic, however it doesn't really give examples on error scenarios & how to handle errors when dealing with json & jqgrid. This also relates to my earlier post on how to deal with Struts global error messages.

anyone with assistance on this?

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
39 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