You are here: Re: How do I send HTML and a file for 'Save-As' at the same time? « PHP Language « IT news, forums, messages
Re: How do I send HTML and a file for 'Save-As' at the same time?

Posted by Daedalus.OS on 10/13/16 11:17

Well I think it would work, but whether it make sense or not depends how bad
you want this progress bar. Personnaly I have to admit that I tend to agree
(in a more diplomatic way maybe) with kimmo. I don't see the use of a
progress bar since all browser shows its own page progress bar or elements
download status. Adding a message in this case would be as efficient IMHO as
a fake progress bar ... But still, I think it would work.

Dae



"Kimmo Laine" <eternal.erectionN0.5P@Mgmail.com> wrote in message
news:d7gnk5$452$1@phys-news1.kolumbus.fi...
> <edykstra@virtualcad.com> kirjoitti
> viestissδ:1117486474.870158.88600@g14g2000cwa.googlegroups.com...
>> Hello Dae,
>>
>> I get it now. However, as I have worked through this application, I
>> have decided on more functionality that adds to the 'requirements' of
>> the application. Basically, I need a Javascript 'Progress Bar' to let
>> the User know things are working. I also need to partially control the
>> progress bar from the server side. What I plan to do is simply use a
>> client side progress bar (so it is really a 'guesstimate' of progress)
>> and control from the server side if it is displayed or not.
>>
>> Here is the flow I see before I added this requirement:
>>
>> 1. User clicks on link for some_page.php which loads.
>> 2. Refresh in some_page.php asks for file_gen.php which starts creating
>> a file.
>> 3. While user is waiting, the 'progress bar' on some_page.php begins.
>> 4. file_gen.php completes file and sends to client.
>> 5. User does a 'Save-As' (or Open-With etc).
>> 6. some_page.php is still open and progress bar is still executing.
>>
>> This is misleading since the progress is complete.
>>
>> Here is what I propose, which minimizes the refreshes, but still allows
>> control over the progress bar. Let me know if this makes sense.
>>
>> Better method:
>>
>> 1. User clicks on link for some_page.php which loads, with no progress
>> bar.
>> 2. User specifies file creation parameters and clicks submit (manual
>> refresh).
>> 3. Server sends back some_page.php with Javascript progress bar
>> started.
>> 4. Refresh in some_page.php asks for file_gen.php which starts
>> creating file.
>> 5. While User is waiting, the 'progress bar' on some_page.php
>> continues.
>> 6. file_gen.php completes file and sends same some_page.php to client.
>> 7. some_page.php now has a progress bar at 100%.
>> 8. some_page.php also contains a refresh to a now existing file.
>> 9. Page refreshes and User does a 'Save-As' (or Open-With etc).
>> 10. some_page.php is still open with progress bar at 100%.
>> 11. User can go back to step 2, which causes the progress bar to be
>> removed.
>>
>> Note: The 'some_page.php' is actually a small dialog with only 2 small
>> jpegs. The file to be created can take up to 30 seconds on a FAST
>> machine. (Long story) If either of these facts were not true, I
>> wouldn't really like the above solution. But, I think in this case it
>> is the best solution.
>>
>> Thoughts? Have I 'got it' now? :)
>>
>
>
> You 'got it' up to the point where you said 'I get it now'. Then you
> started rambling about this crazy progressbar... Look, you can say to user
> "generating file may take up to 30 seconds, please wait". And there's a
> progressbar in all browsers I've seen so far. Call me old-fashioned, but I
> think a) the users aren't that stupid that they would require another
> progressbar and b) you'll just end up looking stupid with the thing.
>
> Just a thought.
>
> --
> "I am pro death penalty. That way people learn
> their lesson for the next time." -- Britney Spears
>
> eternal.erectionN0@5P4Mgmail.com
>

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация