So i’m writing a plugin for wordpress and one of the pages has information that loads on keyup. the issue is that it cannot seem to locate the file no matter what I do! the folder name for the plugin is ‘arl-staff’.
I’ve tried making the load URL equal ‘arl-staff/ajax/search-for-bands.php’, http://www.site.com/blog/wp-content/plugins/arl-staff/search-for-bands.php’ and ‘admin.php?page=arl-staff/ajax/search-for-bands.php’. I just don’t know what else to do. The div loads the blog 404 page upon keyup. Here’s my code:
$("#band_search").keyup(function(data){
$("#band_data").load('ajax/search-for-bands.php', $('#band_search_form').serialize(), function(data){});
});
Any idea what i need to make the URL of the .load to?
Probably the easiest thing to do at this point would be to a string relative to the root. You’ll need to know the publicly accessible url.
For example if your url looks like this:
http://www.example.com/somestuff/otherstuff/ajax/search-for-bands.phpyou will want to load use$("#band_data").load('/somestuff/otherstuff/ajax/search-for-bands.php', $('#band_search_form').serialize(), function(data){});