#88 Infinite recursion when sending Dictionary on Ajax request per POST

Gesloten
8 jaren geleden werd geopend door nero · 0 opmerkingen

Originally at 2011-10-26T21:30:23Z by Sebastian Nozzi closed at 2011-11-02T09:59:16Z

Sending a Dictionary as data per Ajax-POST using JQuery causes an infinite recursion.

My debugging pointed out that JQuery recurses infinitely when trying to somehow convert the dictionary (postData). The same happens when postData is sent an #asJSONObject message.

If postData is a String it works, of course.

Code below:

postData := #{  'filePath' -> 'NameOfCategory.js'.
            'contents' -> '...GeneratedContentsOfCategory...' }.
options := #{
        'type' -> 'POST'.
        'data' -> postData.
        'error' -> [window alert: 'Commit of JS failed!']
    }. 
jQuery 
    ajax: 'somePhpPage.php'
    options: options.
Originally at 2011-10-26T21:30:23Z by Sebastian Nozzi closed at 2011-11-02T09:59:16Z Sending a Dictionary as data per Ajax-POST using JQuery causes an infinite recursion. My debugging pointed out that JQuery recurses infinitely when trying to somehow convert the dictionary (postData). The same happens when postData is sent an #asJSONObject message. If postData is a String it works, of course. Code below: ```smalltalk postData := #{ 'filePath' -> 'NameOfCategory.js'. 'contents' -> '...GeneratedContentsOfCategory...' }. options := #{ 'type' -> 'POST'. 'data' -> postData. 'error' -> [window alert: 'Commit of JS failed!'] }. jQuery ajax: 'somePhpPage.php' options: options. ```
nero gesloten om 7 jaren geleden
Sign in to join this conversation.
Geen label
Geen mijlpaal
Geen verantwoordelijke
1 deelnemers
Laden...
Annuleren
Opslaan
Er is nog geen inhoud.