javascript - How to refresh a specific div of a page in PHP? -


i making online game using php , javascript, have more knowledge in php in javascript, though new in both languages, keep in mind.

so trying make in php / javascript , of course html refresh div or area of code need, , can't make page reload every time gets new information or data because when php ran , done can't have else running, unless use loop though sounds bit sketchy , not sure if that's method. have tried: (php)

header("reload: 1");  

though refreshed page, want happen when data not happening, example program information ready send client page asll other client.

though explination if possible refresh specific area when told example getting mysql data.

function refresh_box()  {     $("#mydiv").load('path php file');     settimeout(refresh_box, 60000); }  $(document).ready(function(){    refresh_box(); }); 

this settimeout call function every 1 minute , load content dynamically in mydiv.


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -