angel1987 Posted March 28, 2012 Share Posted March 28, 2012 I am trying to submit a form, but the next page loads very late. So i was thinking to put a pre loader image or animated loading gif right after the form submission before the next page loads. I am not sure how to do that, please help. Quote Link to comment https://forums.phpfreaks.com/topic/259889-preloader-image-on-click-of-a-button-while-the-next-page-is-being-loaded/ Share on other sites More sharing options...
titan21 Posted March 28, 2012 Share Posted March 28, 2012 I don't think you're going to be able to do that unless you're going to be using AJAX? Quote Link to comment https://forums.phpfreaks.com/topic/259889-preloader-image-on-click-of-a-button-while-the-next-page-is-being-loaded/#findComment-1332040 Share on other sites More sharing options...
rythemton Posted March 29, 2012 Share Posted March 29, 2012 Create a function that acts upon 'onsubmit'. This function could cover the page with a full size (width and height 100%) fix position DIV that has the image you want displayed. I wouldn't use the function to clear or change anything within the form itself, or you might loose the data from the form. Just covering the page would prevent the user from clicking submit again, and would let the user know that something was happening. Quote Link to comment https://forums.phpfreaks.com/topic/259889-preloader-image-on-click-of-a-button-while-the-next-page-is-being-loaded/#findComment-1332228 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.