Juan Carlos Castro
Juan Carlos Castro

Reputation: 183

jquery ajax doesn't work when I use recursion with php

I have a problem using ajax (jquery) and recursion. I call a php script which contains a recursive function. I don't know what's happening but I got this error everytime I call the $ajax function:

POST **myURL** 500 (Internal Server Error)
f.support.ajax.f.ajaxTransport.send  jquery.min.js:4
f.extend.ajax                        jquery.min.js:4
$.ajax                               jquery.validate.js:1068
myfunction                           file.php:216
(anonymous function)                 file.php:1
onclick

Upvotes: 0

Views: 1352

Answers (2)

Juan Carlos Castro
Juan Carlos Castro

Reputation: 183

I fixed my script, I just want to recommend everyone "BACK TO BASICS". I spent 4 hours trying to fix it (I thought it was a recursion problem) and finally I found the mistake: it was a syntax problem in my php script.

Upvotes: 0

Alex Matchneer
Alex Matchneer

Reputation: 3309

You should check your server logs to see what error is happening. Whenever you get a 500 error, it means that your server did receive data from the browser, but something went wrong in the server code. In other words, the problem isn't something in the browser code (i.e. it isn't jQuery/Javascript), so take a look at the server logs to see what's happening there.

Upvotes: 1

Related Questions