Use this function to put up an image at the beginning of an onSubmit event. This should help prevent double submits while users wait on a slow connection.
function onSubmitWait() {
imgwidth = document.body.clientWidth;
imgheight = document.body.clientHeight;
Hoffset = submitWaitImg.offsetHeight;
Woffset = submitWaitImg.offsetWidth;
submitWaitImg.style.left = (imgwidth-Woffset)/2;
submitWaitImg.style.top = (imgheight - Hoffset)/2;
submitWaitImg.visibility = 'visible';
submitWaitImg.display = 'block';
// change cursor
document.body.style.cursor = 'wait';
submitWaitImg.zIndex = '999';
}
previous page
|