I have two frames in my page. The upper frame is a jsp which takes the parameters entered by the user, the lower frame is a Crystal Report viewer which shows teh report once we click on View report button (located in upper frame). I do get a status bar on the bottom of the window (IE property). It is a back-end process carried out by Crystal Reports to process and populate the data in the report. I want a loading image or a message which stays until the report gets loaded. However, there is no pointer where the process is stuck on my jsp that i can monitor the starting or ending of the process. So, my idea is to monitor the status bar of Internet explorer. The moment it starts i want my image to get loaded in the centre of the screen and once the status bar is complete, the image should go away. I shall use something like setInterval(checkStatusBar(),500) which will check every 500 miliseconds for the existence of status bar. My question is what code would be there in the checkStatusBar() ? I need javascript code.
Share
Instead, you might want to detect when the second frame’s load event is fired. You can do this rather simply with some help from jQuery. Something like the following should do what you are looking for:
Where
selectorForTheSecondFrameis a CSS selector that will select the frame you want to check andstopShowingLoadingIndicatoris a function that does what you want to do once the frame has loaded.Obviously, this would make your project dependent on jQuery. You could do the same in pure JavaScript if you wanted, it would just be a bit more work.