AJAX.LastData chopping data short

0 favourites
  • 5 posts
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • I am having my first experiments with using the AJAX function where I am sending data from a form to a perl script. The script parses the url and spits back the values as well as saving them to a .txt file on the server so that I can check that the url was sent correctly. The .txt file shows exactly what I expected and the AJAX.LastData response works flawlessly until the dtat sent exceeds 12 characters.

    Once I enter 13 or more characters into my form I get a blank response even though the server .txt file shows that everything was sent correctly to the server and processed correctly by the perl script.

    It appears that my error is being caused by the AJAX.LastData only accepting 12 character responses.

    Does anyone have any ideas on what is happening here?

  • I've regularly used project files and AJAX calls far exceeding the limits you are talking about and it never was an issue.

    I must guess the script sending back the data to your AJAX call is causing the issue here.

    Check what DOES come out of your server and not just a txt file of what is supposed to come out and you may see where the cut happens.

  • I have copied and pasted the url into the browser and the result is as I would expect. I did make an error in my counting of characters however, I forgot to include some pre text so the actual amount is 24 characters received and not 12. It seems odd that it works fine until I add that 1 last character and then it fails. Its got me beat. I have puzzled over this for 24 hours now.

  • Perhaps the character you are attempting to send is not a valid character, or is putting a end to the string sent.

    Without any of the code of your project or your server script, it is only guessing and crystal ball predictions.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I have stripped everything back as much as possible to eliminate potential error sources. The perl script no longer process the url, all it does is return a simple text message.

    PERL CODE:

    #!/usr/bin/perl

    print "Content-type: text/html\n\n";

    print " This is a very lengthy response to the script call by the construct 2 application.";

    exit;

    The Construct 2 code is

    Construct returns with.....

    This is a very lengthy

    apparently the remained of the text has been stolen

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)