|
|
Q546 Why must I set a timeout delay when submitting a form before closing the window - what is this delay accomplishing?
irt.org | Knowledge Base | JavaScript | Timeout | Q546 [ previous next ] Q546 Why must I set a timeout delay when submitting a form before closing the window - what is this delay accomplishing?
Because JavaScript has no way of knowing when the form has finished beinging submitted - therefore a guesstimate of the amount of time required for the form submit is chosen (5 seconds) and a time is set up to close the window after 5 seconds has passed. However, on a slow day the form may still not have been submitted within the 5 seconds, the closing of the window will interrupt the form submission and it will fail. Feedback on 'Q546 Why must I set a timeout delay when submitting a form before closing the window - what is this delay accomplishing?' |
-- div -->
|