Skip to content
Advertisement

Ajax ResponseText is getting true but can’t write to div

Ajax Code:

JavaScript

Functions.PHP :

JavaScript

Responsetext show on console but can’t write to my div ( id: #xcvb ) Any one can help me about this ?

https://up.uac.ist/images/2019/06/17/Screenshot_2.png https://up.uac.ist/images/2019/06/17/Screenshot_3.png

Advertisement

Answer

Looks like you have a few things wrong here. This is the proper way to use Ajax with WordPress.

JavaScript

You should try echoing your response.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement