javascript - Why doesn't ajax load() work after second and third call? -


i've been trying 3 update same time when click button update count new feeds, notifications , messages. i've tried using setinterval( "getupdate()", 10000 ) too, update automatically every 10 seconds doesn't work second , third divs.

or because ajax doesn't support many load() call?

now, have no idea how should , need helps. thanks.

javascript

</script>  function getupdate(){     $('#newsfeed').load('getnewsfeed.php');     $('#notify').load('getnewnoti.php');     $('#message').load('getnewmessage.php'); }  </script> 

html

<button type="button" onclick="getupdate()" class="btn btn-primary">get update</button> <div id="newsfeed"></div> <div id="notify"></div> <div id="message"></div> 

if problem concurrent ajax calls, can load them in sequence:

function getupdate(){     $('#newsfeed').load('getnewsfeed.php', function(){         $('#notify').load('getnewnoti.php', function(){             $('#message').load('getnewmessage.php');         });     }); } 

if not help, need see rest of page please :)

you need check whether all three server methods returning , not error.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -