Updating two tables via AJAX

Updating two tables via AJAX

backseatbackseat Posts: 7Questions: 3Answers: 0

Apologies, I'm not that great with JS.

I have a page with two tables that are updated via AJAX. The initial population works fine. I have the following code:

    setInterval(function() {
      ttrt.ajax.reload();
    }, 60000 );
    setInterval(function() {
      wwow.ajax.reload();
    }, 10000 );

The intention is that table ttrt should update once a minute, and table wwow every ten seconds. The wwow table updates as expected; the ttrt one does not.

I suspect the second setInterval is overriding the first. Can I have two tables updating at different intervals?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,301Questions: 26Answers: 4,946
    Answer ✓

    Should work. Do you get any browser console errors?

    Can you post a link to a page showing the issue?

    Kevin

  • backseatbackseat Posts: 7Questions: 3Answers: 0

    Oh, embarrassingly it was a typo in my code (I'd not named the table correctly). The hint about browser console errors was helpful, thank you - and sorry for the noise.

This discussion has been closed.