jqGrid save state with local json data - jqgrid

I need to persist the sort, filter and pagination state of a jqGrid that is loading the full data set from the server initially via JSON and then running locally from then on. I've tried jQGridState but was unable to get it to save anything but nulls (apparently I'm not alone). I've also tried the solution from Remember (persist) the filter, sort order and current page of jqGrid but was unable to get it to even create the cookie.
Has anyone worked through either of these solutions with local data or made something work another way?
thanks in advance...

Have you tried using jquery's cookie plugin. Here's an example of someone who got it working:
http://www.trirand.com/blog/?page_id=393/feature-request/Save%20state

Related

Insert values from FORM to DB using AJAX on october cmd

I'm trying to get form data and put it into the database using ajax.
I'm missing the DB insert part.
Couldn't find appropriate documentation on this one.
Please advice.
(it is a very basic usage. basic form, ajax and db)
Thank
You can see here the tutorial http://www.tutorialspoint.com/ajax/ajax_database.htm

CakePHP Completely Random 403 AJAX Errors

I using CakePHP with Backbone.JS, I set up a controller just to give me a JSON output for getting my data, e.g. client names etc, to pass into each Backbone model.
This was all working, or appeared to be, however, it seems that it now gives me some random 403 errors when the page / from is saved or reloaded. But I have no idea why? If it can access it to start with, and does, then why would it not have access after a save or reload?
I have tried, $this->Auth->allow and it dose appear to fix the problem but this data is or could be important and need it not to be access my everybody who might guest at my access path.
Now I have read a number of articles on her, most point to read/write access on the files your accessing, but in my case its just a path /XXXX/XXXXX/myjson/clients For example.
Now I can post my code, if needed, but I am not sure what the problem is, is this a CakePHP issue or is Backbone not requesting the data right?
Please be aware that I am dyslexic, please be kind about my question, if I have not explained myself right. Then please be me some time to re-word / edit my post.
Thanks,
For any one else looking at this, I had added autoRegenerate to the Configure Write Session. For some reason it looks like CakePHP was taking to long to regenerate a new cookie and request my information at the same time.

Learning Yii: checking with ajax won't work

I have a small problem that seems to be big enough to hold me from my work.
As I said in the title, I am leaning Yii and after I developped my project, I realized that I don't have ajax check.
I tried to solve this by setting enableAjaxValidation to true and it didn't worked. I tried to make use of the method performAjaxValidation and, again, it didn't worked. The third way was to copy the content of performAjaxValidation and paste it inside my method (like in documentation and identical with the code generated by Yii.
I checked my js and they are loaded.
What could it be? How can I solve this? The problem is that I need my fields to modify while the user is completing the form.
Thank you!
PS: I checked some topics from stackoverflow but the only one who was related was Yii - Ajax Form with validations
Make sure the from that is being validated has the same ID that is being used in the performAjaxValidation function. For example if your form has the id product-form, the if statement should look like this:if(isset($_POST['ajax']) && $_POST['ajax']==='product-form')
If possible I recommend using Firefox with firebug extension so that you can debug whether the AJAX call is even being made, and what is being returned.

Changing the "Cache-Control" HTTP header for views in Couchdb

I am using CouchDB for a web app and having problems with IE8 caching the results of a view. From my reading it seems one solution would be to change the "Cache-Control" HTTP header to "no-cache". Right now the CouchDB returns the value "must-revalidate".
Is there a way to change the value of this header at all? Can it just be changed for the view?
FYI if you are using jQuery just remember to include cache:false as one of your options in your $.ajax() calls.
CouchDB should be using Etags that change whenever the view content or code changes. However, looking through CouchDB's bug database it looks like there is a cache issue with Internet Explorer that's been unsolved for a while. If that looks like the problem you're having, it might be helpful to propose a fix in the bug ticket or at least remind the CouchDB mailinglist/IRC of the issue.
It looks like the issue is simply IE's bug though, so some sort of workaround might be necessary, like querying the view with the age old extra random parameter hack to make the URL unique when you know you would otherwise encounter a cache issue.

ajax search suggest autocomplete, server keep querying

ajax search suggest autocomplete. when i input something, ajax sends them to the server, query them and send back to client. But sometime when i input some words, ajax sends them to the server, server keep querying them. Should I set up timeout?
I would think so. You actually need to give more background info. There is too less info to make any guesses or suggestions...
I using workbench. So I upgraded it to newer version. It looks like its working fine

Resources