What should the JSON Response look like for No Results?

shogo2040's Avatar


30 Jun, 2011 11:28 PM

I'm using the retrieveComplete option and do something custom when there are no results, but I'm getting JS errors in Chrome and IE8 about data that is returned.

IE8: 'value' is null or not an object
Chrome 12: Uncaught TypeError: Cannot read property 'value' of undefined

IE8 pointed the problem here on line 265: var str = data[num].value;

            function processData(data, query){
                if (!opts.matchCase){ query = query.toLowerCase(); }
                var matchCount = 0;
                for(var i=0;i<d_count;i++){             
                    var num = i;
                    var forward = false;
                    if(opts.searchObjProps == "value") {
                        var str = data[num].value;

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac