Home › Forums › Quform WordPress › php call through ajax › Reply To: php call through ajax
September 12, 2020 at 5:44 am #31929
oivanr
Participant
Thanks a lot for your quick response . I had try with your code, the issue is that when a call the “ajax_var.action” is due to I included that statement inside the plugin in the enqueue scripts action. I think is better to do this
jQuery.ajax({
type: ‘post’,
url: the url of the plugin,
data: ‘action= the name of the php hook or action’,
success: function(result){
$(‘#phpResult’).html(result);
}
Like you can see I delete de nonce because if I don’t use the enqueue action, I am not able to create a nonce inside the js code.
I feel glad with your comments about this.
Thanks again for your support.