www.webdeveloper.com
Results 1 to 2 of 2

Thread: Issue with Ajax.request + JSON

  1. #1
    Join Date
    Jan 2010
    Posts
    5

    Unhappy Issue with Ajax.request + JSON

    Hi guys,
    I'm making this ajax call:

    Code:
     url = "/GeoAdaptaApp/geoLogger/logGuiEvents?json="+aLotOfJSONStuff; 
            encUrl = encodeURI(url,"UTF-8");	
    
        new Ajax.Request(encUrl, { 
               method: 'get', 
               onSuccess: this.sendQueueToServerSuccess( this,logConsole ), 
       	   onFailure: this.sendQueueToServerFailure( this,logConsole ) 
        });
    The JSON string seems correct (I checked it with a validator) and it worked on an Ajax.updater (but i need a request now).

    Firefox keeps telling me:

    Error: no element found
    Source File: http://localhost:8080/GeoAdaptaApp/geoLogger/logGuiEvents?json=%7B%22eventsQueue%22:%5B%7B%<JSON stuff>
    Line: 1

    The call always end up in the onFailure block.

    Full request here: http://tinyurl.com/y8oh968

    It's very strange, any idea about what it could be? Is there a better way to pass json objects to the server?

    Thanks,
    Mulone

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Nearly 9000 character. Probably exceeding the limit for GET
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles