i managed to to get this script. It's refreshing the div of the dialog window:
function getRandom() {
$("#category_dialog").load("<?php echo $category; ?>", '', callback);
}
function callback() {
$("#category_dialog").show("fast");
setTimeout("getRandom();", 10000);
}
$(document).ready(getRandom);
everything works fine. div gets refreshed every 10 seconds. But i have some doubts about this method. 1. since is doing a refresh at any 10 seconds will slow down the speed of the borwser or something like this? 2. I would like to make it refresh more faster at every 3 seconds could anything bad happen?
I would prefer to make somehow a link that will refresh the content onclick -- but i couldn't find any good examples. Can someone help me out with this. So i want the category_dialog div be loaded using load.() but with onclick call -- and display then whats new. Thanks!
With Kissaki help i managed to make a simple function that will make me a refresh link :) here's the sample:
$(function() {
$("#refresh").click(function() {
$("#category_dialog").load("<?php echo $category; ?>")
})
})