Data Limit for $.ajax calls?
I'm experiencing a weird problem when trying to do a $.ajax call. When I pass 5 variables, with either GET or POST, the script runs as I would like. However, when I use 6 or more variables, the script does not run. Does anyone know why this is?
Relevant code (stops1-5 are defined as JS variables earlier in my script, and the alerts are for testing)
- $(".barcrawl-stop-id").each(function(){
- alert("running ajax function");
- $.ajax({
- url: "/handlers/ajax/barcrawl_reorder.php",
- cache: false,
- type: "POST",
- data: ({
- stop: n,
- id: $("#barcrawl-id").val(),
- stop1: stop1,
- stop2: stop2,
- stop3: stop3,
- }),
- success: function(html){
- alert(html);
-
- }
- });
- n++;
- });
So, the way it is now, it works fine (I get the first alert for each instance of .barcrawl-stop-id, and get an alert at the end with the returned data). However, when I add another variable to the data, like stop4: stop4, the script does not run (all I see is one alert with "running ajax function"). Help please?
Thanks in advance.