Cannot get JSON data from ASPNET HTTP Handler

hostmax's Avatar

hostmax

30 Mar, 2012 06:49 PM

Hi everyone,
I have been trying to make the plug-in work ... it works fine when I fetched some prefill data (using Javascript object)... However when I made it fetch the data from a web url: when an item exist, nothing happens, however when I typed in something that does not exist, it shows popup that says "No results found"...

This is my calling function:
$(document).ready(function() {

            $(function() {
            $("input[id=test]").autoSuggest("../QueryUserInfo.ashx", { minChars: 2, selectedItemProp: "value", searchObjProps: "name" )});});

and here is the data returned:

[{value:"test", name:"Test Users"},{value:"testing", name:"Still Testing"}]

Did anyone see this kind of situation before ?

  1. 1 Posted by hostmax on 30 Mar, 2012 06:59 PM

    hostmax's Avatar

    Sorry everyone... it seems I found the solution... my JSON is missing " in key name :(

  2. 2 Posted by Kobie on 13 Apr, 2012 12:59 PM

    Kobie's Avatar

    Hi, did you get this sorted out? I am also struggling with this.
    Thanks

  3. 3 Posted by hostmax on 13 Apr, 2012 03:23 PM

    hostmax's Avatar

    What's the problem you are facing ? You need to make sure that the JSON data you output is in correct format .... Check the example prefill data posted on the homepage, you might find something :)

  4. 4 Posted by Richard on 25 Apr, 2012 05:12 PM

    Richard's Avatar

    I'm really new to ASP.NET so trying to write the .ashx file is confusing me. Would anyone be willing to post or email me an example .ashx file? Thanks for you help!

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

Generic

? 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