struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Hess" <gh...@wrappedapps.com>
Subject RE: [OT] Animated .GIF's
Date Fri, 20 Feb 2004 20:51:20 GMT
Hi Jerry,

I have recently worked on the same problem but I was handling it
differently but pretty much the same stuff. I don't have a direct answer
to your question regarding the image animation suspending and I ended up
changing my business logic to queue the transaction and report
confirmation by email rather than waiting for the transaction to
complete on a progress page. I read an article on this once that called
these type of transactions TCP(time consuming process) or something like
that, and there are several ways to handle them.

In my case I had an application running within an IFrame where one of my
Actions performed a TCP. What I did was have the request POST to an
Action that placed a transactionBean in the session then forward to a
"please wait page" with a progress.gif and in JavaScript set the page to
refresh in Xsec to another Action that would actualy process the
transactionBean. So while the user was waiting they saw my progress.gif
and friendly message. Well my progress.gif was working great and then my
requirments changed and I had to display the pages within an new browser
window. Guess what broke, my progress.gif would no longer strob, as soon
as the browser refreshed the animation would stop. The only thing I
changed was the fact that the application was being displayed in an
IFrame. I tried to fix it several ways including putting the
progress.gif in a page alone and displaying it in an IFrame with no
success. I had to move on and removed the progress.gif and endedup not
needing it anyway as I mentioned earlier.

I am not sure why it was working in the IFrame or if it was just a bug
in the browser that ignored the frames action?? But I do know how I will
do it 
next time if I realy have too.

I would have my Action launch a thread to process the transactionBean.
Bind the transactionBean to the session and add a couple methods to
indicate progress status. My Action would then forward to the "please
wait page". The please wait page would refresh itself every Xsec
checking the status of the transactionBean in the session and either
display the please wait and progress.gif or redirect to the confirmation
page. Depending on how big the images are you often hardly notice the
refresh. With this you could even display a progress indicator that was
reflecting the actual process. 

As you can see it seems like overkill and that is why I have either
removed the progress.gif or changed my process to accommodate usablity
issues. But this bugged me too for a while.

HTH,

Greg 





> -----Original Message-----
> From: Colin Kilburn [mailto:colink@accesstec.ca]
> Sent: Friday, February 20, 2004 2:05 PM
> To: Struts Users Mailing List
> Subject: Re: [OT] Animated .GIF's
> 
> Jerry,
> 
> Here's the whole page, it expects an image called progress.gif.
> 
> <html>
> <head>
> <style>
>         .floater {
>            visibility: visible;
>         }
>         .hider {
>            visibility: hidden;
>         }
> </style>
> 
> 
> <script language="javascript">
>    function progressBar(elementName) {
>       var element = document.getElementById(elementName);
>       element.className = 'floater';
>    }
> </script>
> 
> 
> </head>
> <body>
>         <div id="progress" class="hider">
>                 <img src="progress.gif" width="80" height="80"
> border="0" alt="Hang Tight!">
>         </div>
> </body>
> <form>
>         <input name="submit" value="Click me" type="button"
> onClick="progressBar('progress');">
> </form>
> </html>
> 
> 
> 
> HTH,
> Colin
> 
> 
> Jerry Jalenak wrote:
> 
> >Colin -
> >
> >Can you post your <div> ... </div> code?  I just tried to wrap my
<img />
> in
> >one and it still doesn't work....
> >
> >Jerry Jalenak
> >Development Manager, Web Publishing
> >LabOne, Inc.
> >10101 Renner Blvd.
> >Lenexa, KS  66219
> >(913) 577-1496
> >
> >jerry.jalenak@labone.com
> >
> >
> >
> >
> >>-----Original Message-----
> >>From: Colin Kilburn [mailto:colink@accesstec.ca]
> >>Sent: Friday, February 20, 2004 12:42 PM
> >>To: Struts Users Mailing List
> >>Subject: Re: [OT] Animated .GIF's
> >>
> >>
> >>Jerry,
> >>
> >>I was just toying with something similar yesterday.   My image was
> >>inside a div, though, and the animation works fine.  ... i.e.
> >>I changed
> >>the display attribute on the div, not the image.   I'm also using
> >>mozilla on mandrake 9.   Not sure about how it behaves in IE.
> >>
> >>HTH,
> >>Colin
> >>
> >>Jerry Jalenak wrote:
> >>
> >>
> >>
> >>>I've been trying to find an answer to this via google for
> >>>
> >>>
> >>awhile now, but
> >>
> >>
> >>>can't seem to find any info on my problem.  I'm hoping
> >>>
> >>>
> >>someone might be able
> >>
> >>
> >>>to shed some light on this for me.....
> >>>
> >>>I've got a simple animated .gif (Loading Data... kind of
> >>>
> >>>
> >>thing) that I need
> >>
> >>
> >>>to display whenever my submit button is clicked.  Until the
> >>>
> >>>
> >>submit button is
> >>
> >>
> >>>clicked though, I hide the image
> >>>
> >>>	<img border=0 id="loadingData" src="loadingData.gif"
> >>>style="display:none;">
> >>>
> >>>When the user clicks the submit button, I use javascript to
> >>>
> >>>
> >>change the style
> >>
> >>
> >>>to "display:inline".  The image appears, but the animation
> >>>
> >>>
> >>doesn't seem to
> >>
> >>
> >>>work.  If I load the image without the "display:none" or even with
> >>>"display:inline", the animation works fine.  It only seems
> >>>
> >>>
> >>to fail when the
> >>
> >>
> >>>initial display setting is 'none'.  What gives?  Am I just missing
an
> >>>additional setting?
> >>>
> >>>Thanks.
> >>>
> >>>Jerry Jalenak
> >>>Development Manager, Web Publishing
> >>>LabOne, Inc.
> >>>10101 Renner Blvd.
> >>>Lenexa, KS  66219
> >>>(913) 577-1496
> >>>
> >>>jerry.jalenak@labone.com
> >>>
> >>>
> >>>This transmission (and any information attached to it) may
> >>>
> >>>
> >>be confidential and
> >>
> >>
> >>>is intended solely for the use of the individual or entity
> >>>
> >>>
> >>to which it is
> >>
> >>
> >>>addressed. If you are not the intended recipient or the
> >>>
> >>>
> >>person responsible for
> >>
> >>
> >>>delivering the transmission to the intended recipient, be
> >>>
> >>>
> >>advised that you
> >>
> >>
> >>>have received this transmission in error and that any use,
> >>>
> >>>
> >>dissemination,
> >>
> >>
> >>>forwarding, printing, or copying of this information is
> >>>
> >>>
> >>strictly prohibited.
> >>
> >>
> >>>If you have received this transmission in error, please
> >>>
> >>>
> >>immediately notify
> >>
> >>
> >>>LabOne at the following email address:
> >>>
> >>>
> >>securityincidentreporting@labone.com
> >>
> >>
>
>>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>>For additional commands, e-mail:
struts-user-help@jakarta.apache.org
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
>
>>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >>
> >>
> >>
> >>
> >
> >This transmission (and any information attached to it) may be
> confidential and
> >is intended solely for the use of the individual or entity to which
it is
> >addressed. If you are not the intended recipient or the person
> responsible for
> >delivering the transmission to the intended recipient, be advised
that
> you
> >have received this transmission in error and that any use,
dissemination,
> >forwarding, printing, or copying of this information is strictly
> prohibited.
> >If you have received this transmission in error, please immediately
> notify
> >LabOne at the following email address:
> securityincidentreporting@labone.com
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message