Load page HTML content through AJAX

An AJAX request is a request from a client like any other request. Just request the URL like normal, but with Javascript. As far as that goes, this should be simple. If you’ve done item #2– “I’ll wrap the header/footer/sidebars…”– correctly there should be no problem except that page specific functions won’t run. That is … Read more

admin-ajax.php not loading anymore

It turns out the problem was a configuration server problem. The admin turned off Open_basedir and all of my headaches, at least on this front, are gone now. I am not sure what open_basedir does exactly, but I think it was originally pointing to a folder outside wordpress, so the Ajax calls in the dashboard … Read more

ajax in admin menu

add_action(‘wp_ajax_ring_callback’, ‘ring_callback’); Should be the hook you must be using to enable ring_callback function call.

get content from page through AJAX

Is this the correct way to do it ? This is not the correct way to do this. What you are doing, first, doesn’t make sense conceptually. When you load that page (assuming it loaded correctly) you would be loading the entire WordPress page, not just the comments. That is, you will load <html> all … Read more

Ajax page load without reload

You can re-initialize all the scripts once again inside the AJAX success. // Fetch the scripts scripts=””; if ( scripts.length ) scripts.detach(); scripts = response.find(‘script’); // Add the scripts scripts.each(function(){ var script = jQuery(this), scriptText = script.html(), scriptNode = document.createElement(‘script’); try { // doesn’t work on ie… scriptNode.appendChild(document.createTextNode(scriptText)); contentNode.appendChild(scriptNode); } catch(e) { // IE has … Read more