Antonio Testa Posted May 28, 2020 Share Posted May 28, 2020 It seams basic but I did not have success to update two different <div> at same time, every second .... Here is my code: <script src='http://code.jquery.com/jquery-latest.js'></script> <script> $(document).ready(function update(){$('#X0').load('V');setTimeout(update,2500);});</script> To be update: <div id="X0">will be updated</div> <div id="X1">will be updated too</div> The server response to get/V: <div id="X0">new x0 content</div><div id="X1">new x1 content</div> I have tried to make a lot of different changes over function update() but none of them worked... Thanks for any help. Antonio Link to comment Share on other sites More sharing options...
dsonesuk Posted May 29, 2020 Share Posted May 29, 2020 Where is the initial call the run the function? You have the the function with a setTimeout to run it again! but there no calling of function to start the process. Link to comment Share on other sites More sharing options...
Antonio Testa Posted May 29, 2020 Author Share Posted May 29, 2020 The correct question is in the previous post. I will delete this one. Apolozige for that and I will appreciate your help. Thank you dsonesuk Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now