Reputation: 748
I need to open pop for settings page of my plugin admin end. For which i have used WP default thick-box, i have used the below code to call my ajax page within thick-box.
tb_show($(this).data('attr').toUpperCase()+' CONFIGRATIONS',ajaxurl+'?height=545&width=700&overflow=hidden&action=getTheContent&data='+$(this).data('attr'));
But issue is that the ajax response always returns 0, so i can always see the 0 under the html which i have called by ajax. The possible cause for this is that action parameter for ajax call needs to be pass as post , but i am not getting how do i integrate it with thickbox call.
Upvotes: 0
Views: 508
Reputation: 58
A 0 will appear in the box if you do not exit the function getTheContent using
exit();
Upvotes: 2