Answer the question
In order to leave comments, you need to log in
$.ajax asynchronous request failing?
An asynchronous request does not work, I have been suffering for 8 hours already, I watched a ton of video tutorials, I seem to be doing everything right.
There is an assumption that the url is not correctly specified, but I tried it this way and that :(
Here is the javascript itself, its location can be seen on the left (I highlighted it)
And here is php itself, where, in theory, I send the request
Answer the question
In order to leave comments, you need to log in
That's it, I figured it out, thanks to everyone, the error was that I connected to the class that connects to the main page, respectively, knocked out errors, there is no connection type to the database, etc., redirected to the main page where this class is connected and everything worked great :)
Use the browser console - this is perhaps one of the best friends of a WEB developer, it simplifies life at times))
firebug for example or built-in.
How do you determine what doesn't work? Open the development tools, take a look at the network, and see what goes where.
What if we add return false to the end of the button click handler?
debug
in the browser console, see where the request goes, set a
breakpoint in index.php and see where the route goes
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question