$.ajax is not a function error - using the full jQuery library

Hi folks,

If anyone has seen my previous post, I am trying to build a custom chatbot in Wappler using Dialogflow to detect intent in user typed messages. Given Google’s authentication requirements, I ended up writing code in a separate php file to make the API call. I was writing a script to pass the input text variable from Wappler HTML/front end to that php file as an ajax call. However, it was throwing an error and upon investigation it looks like the $.ajax function requires the full jQuery library and not the ‘min’ one used by Bootstrap. It looks like I am unable to add the full library. Does anyone have a recommendation on alternates to $.ajax function to pass a variable to my custom php file?

Hi

I had a similar issue, Ajax is not supported by the ‘Slim’ verson, the ‘min’ is minified so should have no impact.
Just change your jquery to a non-slim version, you should be able to do this by changing your framework in Wappler to a non-slim version but I had some troubles doing this as it seemed to make no difference so I have just replaced the lines in the head

from:

/js/jquery-3.4.1.slim.min.js

to:

js/jquery-3.4.1.min.js

this worked for me.

Great, thank you! I’ll try that.