RE: Show status during long request
Sorry for coming into this thread late, but... Has anyone pointed you to cf_Progressmeter yet? Its dirt cheap (US$5) and does what its name implies quite nicely. Super easy to implement. Here's the demo: http://www.mollerus.net/development/cftags/cf_progressmeter_demo.cfm?RequestTimeout=200 -- --- Matt Robertson, [EMAIL PROTECTED] MSB Designs, Inc. http://mysecretbase.com --- -- [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Show status during long request
Thanks a lot for that snippet. -Original Message- From: Michael Wilson [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 12:29 PM To: CF-Talk Subject: RE: Show status during long request Hi, This is what I use: <br> <!--<br> #LoadingMessage {<br> position: absolute;<br> visibility: visible;<br> height: 100%;<br> width: 100%;<br> top: 0px;<br> left: 0px;<br> background-color: #FF;<br> }<br> --><br> <br> function showMessage () {<br> if (document.layers) {<br> document.LoadingMessage.display = 'none';<br> document.Content.visibility = 'visible';<br> }<br> else if (document.all) {<br> document.all.LoadingMessage.style.display = 'none';<br> document.all.Content.style.visibility = 'visible';<br> }<br> else if (document.getElementById) {<br> document.getElementById('LoadingMessage').style.display = 'none';<br> document.getElementById('Content').style.visibility = 'visible';<br> }<br> }<br> Loading message Content Best regards, Michael Wilson From: Nathan C. Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 10:12 AM To: CF-Talk Subject: Show status during long request Hi, I have a page that takes a long time to process, I would like to update the user, or at least hide the form that appears on the page, while the pages are processing. _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Show status during long request
Hi, This is what I use:
function showMessage () {
if (document.layers) {
document.LoadingMessage.display = 'none';
document.Content.visibility = 'visible';
}
else if (document.all) {
document.all.LoadingMessage.style.display = 'none';
document.all.Content.style.visibility = 'visible';
}
else if (document.getElementById) {
document.getElementById('LoadingMessage').style.display = 'none';
document.getElementById('Content').style.visibility = 'visible';
}
}
Loading message Content Best regards, Michael Wilson From: Nathan C. Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 10:12 AM To: CF-Talk Subject: Show status during long request Hi, I have a page that takes a long time to process, I would like to update the user, or at least hide the form that appears on the page, while the pages are processing. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Show status during long request
put the message in a DIV with an ID. Then just add an onLoad event to your body tag to remove the DIV from the DOM. Doug -Original Message- From: Nathan C. Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 10:30 AM To: CF-Talk Subject: RE: Show status during long request Raymond, OK, that worked really well to get a "please stand by" style message while processing, Is there a clean way to clear that message before displaying the results? Thanks for your help. -Nate -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 10:19 AM To: CF-Talk Subject: RE: Show status during long request > > I think I need to use cfflush, but if anybody has any > pointers on how to accomplish this I would be very appreciative. It is actually pretty simple. Just use . There is one thing to worry about. In IE, the browser "helps" by not displaying content until it gets "enough" content. Let's all pause for a minute to thank MS and it's infinite wisdom. Anyway, sometimes you have to push IE to force it to display something. So, I would use code like this: Please stand by while we do the foo. #repeatString(" ",250)# The repeatString function just outputs a big block of white space that the browser will display as _one_ space. Normally folks have HTML and other bits already output so this hack isn't needed. Also, note that you can't use tags like cfcontent, cfcookie, cfheader, etc, after using cfflush. _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Show status during long request
There are tricks - see John D Burn's suggestions. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Show status during long request
Raymond, OK, that worked really well to get a "please stand by" style message while processing, Is there a clean way to clear that message before displaying the results? Thanks for your help. -Nate -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 10:19 AM To: CF-Talk Subject: RE: Show status during long request > > I think I need to use cfflush, but if anybody has any > pointers on how to accomplish this I would be very appreciative. It is actually pretty simple. Just use . There is one thing to worry about. In IE, the browser "helps" by not displaying content until it gets "enough" content. Let's all pause for a minute to thank MS and it's infinite wisdom. Anyway, sometimes you have to push IE to force it to display something. So, I would use code like this: Please stand by while we do the foo. #repeatString(" ",250)# The repeatString function just outputs a big block of white space that the browser will display as _one_ space. Normally folks have HTML and other bits already output so this hack isn't needed. Also, note that you can't use tags like cfcontent, cfcookie, cfheader, etc, after using cfflush. _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Show status during long request
It's also important to note that cfflush doesn't like to be within an opening and closing custom tag. - Calvin - Original Message - From: Raymond Camden To: CF-Talk Sent: Tuesday, April 06, 2004 11:19 AM Subject: RE: Show status during long request > > I think I need to use cfflush, but if anybody has any > pointers on how to accomplish this I would be very appreciative. It is actually pretty simple. Just use . There is one thing to worry about. In IE, the browser "helps" by not displaying content until it gets "enough" content. Let's all pause for a minute to thank MS and it's infinite wisdom. Anyway, sometimes you have to push IE to force it to display something. So, I would use code like this: Please stand by while we do the foo. #repeatString(" ",250)# The repeatString function just outputs a big block of white space that the browser will display as _one_ space. Normally folks have HTML and other bits already output so this hack isn't needed. Also, note that you can't use tags like cfcontent, cfcookie, cfheader, etc, after using cfflush. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Show status during long request
You can use CFFLUSH, but that just writes the data to the page. You can't really "erase" what you wrote to the page without using some form of _javascript_ and hiding and showing divs. I've done this before with a simple: Please wait because this may take a minute Then, at the bottom of your code that does all the outputting, put a _javascript_ line to hide that div and it will appear that it's not there. I also tried doing a status bar once, where I had an image and using _javascript_, I updated the width of the image and the text displayed next to it, but I updated it every 1 percent and that wrote a separate line of _javascript_ to the page, so I was unnecessarily writing 100 lines of _javascript_. Every 25% might be more feasible and still give you decent performance. John -Original Message- From: Nathan C. Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 10:12 AM To: CF-Talk Subject: Show status during long request Hi, I have a page that takes a long time to process, I would like to update the user, or at least hide the form that appears on the page, while the pages are processing. I think I need to use cfflush, but if anybody has any pointers on how to accomplish this I would be very appreciative. I'd the form to be submitted, then a page would come up that says processing - don't touch that browser and then the results and a new form come up on the page. If it could be more descriptive - like say 6 of 42 processed that would be neat too. (processing occurs inside a loop) I could really use a clue. Thanks. -Nate Nathan Smith McKee, Voorhees & Sease, P.L.C. 515.288.3667 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Show status during long request
> > I think I need to use cfflush, but if anybody has any > pointers on how to accomplish this I would be very appreciative. It is actually pretty simple. Just use . There is one thing to worry about. In IE, the browser "helps" by not displaying content until it gets "enough" content. Let's all pause for a minute to thank MS and it's infinite wisdom. Anyway, sometimes you have to push IE to force it to display something. So, I would use code like this: Please stand by while we do the foo. #repeatString(" ",250)# The repeatString function just outputs a big block of white space that the browser will display as _one_ space. Normally folks have HTML and other bits already output so this hack isn't needed. Also, note that you can't use tags like cfcontent, cfcookie, cfheader, etc, after using cfflush. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]