The problem is this. I have a CGI which can take a few minutes to process a request. It is important that this request not be processed twice. To that end I have set up tables and status codes for the request so that no matter how many times the User pounds on the submit button the request will only be processed once.
My problem is this: The solution requires a process to poll the interim table until the request has been completed. If the User hits the "Submit" button multiple times then multiple processes will be spawned that will start polling the table.
I want to avoid having several processes that poll the table at the same time. I figure a good way of doing that would be if the process could detect whether the browser that started the request is still listening to it. Is there a way to do this?
I know I can use javascript to disable the button so it can only be "submit"ed once. I will be doing this, however I want a solution that will not require the user to have javascript enabled.
Thanks in advance.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.