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
Want to run dataUrl not only once
09/09/2010
05:14
Avatar
kct01
Member
Members
Forum Posts: 6
Member Since:
09/09/2010
sp_UserOfflineSmall Offline

Hi!

First time to post here, as I really can't find the solution. Hope someone could help me.

I was trying to get to select option dynamically. I know "dataUrl" would help and it can refresh everytime if one use inline editing.

However, I would like to use form editing but in this situation, dataUrl would only get the options from database once.

Does anyone know how to force it to run not only once!?

Thank you in advance!

Roy Tam

23/03/2012
11:36
Avatar
jonathan.a
New Member
Members
Forum Posts: 2
Member Since:
22/03/2012
sp_UserOfflineSmall Offline

No but i'm searching the solution too....

23/03/2012
13:02
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Probabably you have problem with caching the results of the previous Ajax request in Internet Expolrer. You can try to add

ajaxSelectOptions: { cache: false }

as additional option of jqGrid (see here).

Even more better if you would set "Cache-Control" HTTP header to "max-age=0" in the server response of dataUrl. The difference I described here. Shortly the difference is: usage of cache: false in the ajax request makes additional parameter to every request. So the request will be saved in the local cache as unique URL. The previously saved URL will never used. The usage of "Cache-Control" header to "max-age=0" will follow to that every previous saved data will be revalidated on the server. So the dataUrl will be called every time. If the server return data in the response the data will be replace the previously cached data. You have additional option to send ETag as additional HTTP headel with for example MD5 hash from the returned data. The ETag from the previous saved server response will be send in the revalidation request. So the server are able return empty body and special "304 Not Modified" response to inform the web browser that it can just use its local previously cached data.

Best regards
Oleg 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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