Hi friends,

I want to submit a form using ajax and I want to show "LOADING" in the login page till the next page completely loads. and after its load then go to that page and show its contents. Any ideas ? Please help

Thanks in advance

6 Years
Discussion Span
Last Post by scrappedcola

Either have a div containing the loading graphic of your choice already set up on the page and set it's display to none or dynamically create said div. Then on the submit of the form (before you perform your ajax) show the loading div. Then on the success of the ajax event simply re-hide the div or remove it. You will want to

position:relative;height:100%; width:100%;

The div containing the loading graphic and just set the background of the div to be the gif of your choice. Pre-rendering the div has the advantage of always being there and thus you can use it for other actions. Also depending on your layout you might need to manually set the height and width of the loading div to entirely cover the contents (for example if your layout is larger than one screen setting the height/width of the div will allow it to cover content below the view port and still cover it on scroll).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.