This may of some value to anyone who runs into the above problem: the example shown in the page I linked to only works with version 2.2.1 (and above, I assume). I was trying this on a 2.0.x WordPress blog.
I think problem with is that the call to myplugin_elev_lookup should be to myplugin_ajax_elev_lookup. I am guessing that the function defined later function myplugin_ajax_elev_lookup() is what it is supposed to be looking for.
I haven’t gotten my own Admin AJAX to work either. It calls the JavaScript part fine, but then doesn’t call the php Function.
Just started developing a plugin and this is where I’ve also got to! I’m using WordPress 2.5.
The Javascript call is made but when the wp_ajax call is forwarded the expression if ( !isset($wp_filter[$tag]) ) is true (there was no onward filter in the list). It’s almost as if the action is no longer hooked which I suppose could be depending on how the session has been configured for the AJAX request. I’m an AJAX and WordPress newbie so I could be wrong!
If anyone has any insight I’d really appreciate it! Thanks in advance!
Found my issue. I was not loading my plugin objects if the invocation was not an Admin – using is_admin() – so I was partly on the track with the session configuration for the AJAX request. With an AJAX invocation the is_admin call returned false.