Forum


01:59

23/01/2010

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?
14:32

11/12/2009

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

13/01/2010

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?
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66