WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Using WP Ajax in Plugin

[Resolved] Using WP Ajax in Plugin

  • Hi.. been banging my head against the wall.. hoping one good “bang” will make this code work.

    If anyone can help… thanks!!

    Here is the javascript I’m using:
    http://pastebin.com/SvVnTuAT

    And here is the function in my plugin file:
    http://pastebin.com/p1CpBArs

    I can get the js alert to display the serialized array… I just can’t get the ajax to load it back into the plugin admin screen.

    Any help is appreciated!

Viewing 1 replies (of 1 total)
  • I got it.

    I found out that you have to put your add_action('wp_ajax_... bit at the top level of your plugin. I had it nested inside my admin_menu hook, which didn’t work.

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Using WP Ajax in Plugin’ is closed to new replies.