Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Want to show a loading image in JSP  RSS feed

 
Barnabas Jeremiah
Greenhorn
Posts: 26
Chrome Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I need your help.
I have to show a loading image which should tell some proper loading message in jsp.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66144
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the specific problem? Showing an image -- even a "loading" image which is usually some sort of animated GIF -- is no different than showing any other image.

You'll need to be more specific about what you need help with.
 
Barnabas Jeremiah
Greenhorn
Posts: 26
Chrome Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear,
I want a example code to show a loading gif message in a jsp when submitting.
 
Paul Clapham
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aha. If I translate that correctly, you want to submit a request to the server and have a screen be displayed which says "Loading..." until the server responds with the actual response. Is that guess correct?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66144
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If that's the case, then it's a tad complicated because once you submit the page, all processing stops. So you can't really show anything while "between" pages.

The best way to get around this is to use Ajax to make the submission. That way the page remains displayed while the request is ongoing, and you can show whatever you want while it is taking place.
 
Surendra Kumar
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about using just JavaScript and in that show the image and call form submit?
That way, the image is displayed until the next page is rendered.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66144
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Surendra Kumar wrote:How about using just JavaScript and in that show the image and call form submit?
That way, the image is displayed until the next page is rendered.

There is no difference to what's already been discussed.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!