permaculture playing cards*
The moose likes HTML, CSS and JavaScript and the fly likes jQuery loading image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jQuery loading image" Watch "jQuery loading image" New topic
Author

jQuery loading image

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9468
    
    2

Guys,

Is this loading image / spinner available only for jQuery ajax requests? I have a normal jsp page rendered through calling a struts action. This rendered jsp page is built using jQuery UI tabs and since this contains a lot of content, I want the page to be shown only when it is completely ready. Right now when I call the page, I first see the jQuery UI tabs without any image and then it suddenly flips to the original content will all the images loaded. Any idea on how I could use the spinner image till the page is completely ready for rendering?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61451
    
  67

Joe Harry wrote:Is this loading image / spinner available only for jQuery ajax requests?

What is "this"?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9468
    
    2

Ok. Here is what I want. I request a jsp page and I want to show the page only after all the response has been written to the browser. Below is a screenshot of what happens. Screen 1 appears for a second and then the complete screen gets loaded. I do not want that to happen. Instead of screen 1, a spinner showing "Loading..." should be shown and then once the complete DOM is ready, the page should be shown. Ideas?


[Thumbnail for Screenshot_2.jpg]


[Thumbnail for Screenshot_1.jpg]

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: jQuery loading image