Hello,
I need help with reloading some part of page, actualy i want to make reload some content (post) on my wordpress blog without reloading page.. simple users can click on refresh button and get new post ...
Im make random.php file and im include in my page this file, so there is 6 random posts...
<?php include 'random.php';?>
So now i need reload this part on click without reloading all page, im try found solution on the google but cant find any good tutorial or example..
This works only with html
- <input type="button" onclick="example_ajax_request()" value="Click Me!" /> <div id="example-placeholder"> <p>Placeholding text</p> </div>
function example_ajax_request() { $('#example-placeholder').html('<p><img src="/images/ajax-loader.gif" width="220" height="19" /></p>'); $('#example-placeholder').load("/examples/ajax-loaded.html"); }
But i cant reload 'random.php' in this way , any help pls ?