I have 2 HTML pages: one that ask the user for input about a topic, and one that pulls Twitter data from the Twitter Streaming API pertaining to that topic. This information, however, changes constantly. When I refresh manually, there’s a Pop-up that notifies me that I want to “Confirm Data Resubmission” and when I click “continue”, it gives me new information. I want to do this automatically within my code, and do this every 10 seconds.
My HTML page was created in tandem with Flask, and uses the Twitter Bootstrap CSS and JS files. I tried using the <meta>
way and while it does refresh the page automatically, it does not retain the form data submitted on the previous page.
Is such a thing just not possible?
3
Answers
I assume you have a button which submits this form. Have you thought about subscribing to an onClick event? You can create a callback function and inside it invoke
location.reload();
from window global object.You can use:
and
To set time interval you may use this
window.setInterval(function, milliseconds)
For documentation