mangoHero1 mangoHero1 - 1 year ago 63
HTML Question

How to automatically reload a page after x seconds with form data resubmitted

I've been digging around and can't seem to find the answer for this scenario...
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

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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download