aspose file tools*
The moose likes Struts and the fly likes animation in struts while  searching Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "animation in struts while  searching " Watch "animation in struts while  searching " New topic
Author

animation in struts while searching

partha chaudhuri
Greenhorn

Joined: Sep 21, 2004
Posts: 27
I am developed a j2ee application with struts 1.2.9.
In the jsp page when i click the search button it is going to the action class---ejb--DAo and returning to the jsp page.
It is working fine.

Now my problem is when i am hitting search button and the data coming back from server and repainted the jsp page, i need to show animation( that it searching record ).
I want to use coomon animation code to use for all the jsp pages.
Can any one help me as it is urgent.

Thanks and regards,
Partha Sarathi Chaudhuri
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I'd suggest using an animated GIF file for this. This is a graphics file that has its animation built-in so that you don't have to do any JavaScript Animation.

If you download the example code for the bookASP.NET Insider Solutions you will find some progress bar animations that you can use.


Merrill
Consultant, Sima Solutions
partha chaudhuri
Greenhorn

Joined: Sep 21, 2004
Posts: 27
Hi,
I am not clear what you said.
could you please elaborate with code.
how can i use a popup animation while searching.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Below is a sample JSP showing one way to do a progress bar. The way this code works is that You have both the main part of the page and the progress bar part included in the page in different <div> tags. When the page is first displayed, the main part of the page is visible, but the progress bar is not. When the form is submitted, the JavaScript gowait() function makes the main part of the page invisible and the progress bar visible.

I got the image used in the page (images/progressbar10.gif) by clicking on the "download example code" link in this page, which is the link I gave you in my last post.

Here is the JSP:



Ideas for this technique were originally gleaned from this thread.
[ May 24, 2006: Message edited by: Merrill Higginson ]
partha chaudhuri
Greenhorn

Joined: Sep 21, 2004
Posts: 27
Thanks for your help.
It is working.
Partha
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: animation in struts while searching