jQuery UI Widgets Forums Navigation Tree AJAX on demand

Tagged: , , , ,

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • AJAX on demand #33041

    stask
    Member

    Hi!

    First of all, I want to say that I’m relatively new in Jquery usage. I’m using the jqxtree plugin to load a tree using ajax on demand. In the example, you use static files, and I want to use a perl script to load the data.

    My root JSON looks like:

    [{
    "label": "Folder Roor",
    "items": [
    { "value": "../../cgi-bin/AJAXtree.cgi",
    "label": "Loading..."
    }]
    }]

    And the CGI simple returns the content of ajax1.htm. The content returned looks like that:

    Content-type: application/json

    [
    { "label": "Folder 1", "items": [{ "value": "ajax.htm", "label" : "Loading..." } ] },
    { "label": "Folder 2", "items": [{ "value": "ajax.htm", "label" : "Loading..." } ] },
    { "label": "Folder 3", "items": [{ "value": "ajax.htm", "label" : "Loading..." } ] }
    ]

    It seems that the JS capture the data send by the CGI, but in FireBug I get this error: JSON.parse: unexpected character

    But It seems all correct… You can try it here

    • This topic was modified 10 years, 3 months ago by  stask.
    AJAX on demand #45433

    Peter Stoev
    Keymaster

    Hi stask,

    As far as I saw, your Ajax call is unsuccessful due to some Syntax Error.

    The exact error message is:

    Uncaught SyntaxError: Unexpected token o

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.