Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JS] Procent Załadowania strony
Spirit86
post
Post #1





Grupa: Zarejestrowani
Postów: 607
Pomógł: 23
Dołączył: 8.09.2004
Skąd: Wrocław

Ostrzeżenie: (0%)
-----


Witam.
Chcę uzyskać taki efekt:
Mam formularz z uploaderem. Chciałbym, aby po submitowaniu wyświetlił się postęp wgrania(w procentach) pliku na serwer. Nie chcę, aby były tam jakieś fajerwerki jak postęp itp. Wydaje mi się, że najłatwiej byłoby sprawdzić, jaki jest postęp otwierania strony, tzn. w jakim procencie została otworzona. Takie coś jak w pasku IE, Opery, FF, tyle tylko, że było by to wyświetlane w inpucie (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) .


Przykład
Wgrywanie pliku(97%)

Widziałem poniższy topic :]. Jednakże nie widzę w nim oczekiwanego rozwiązania.

Pozdrawiam
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
dr_bonzo
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 5 724
Pomógł: 259
Dołączył: 13.04.2004
Skąd: N/A

Ostrzeżenie: (0%)
-----


1 .stan zaladowania strony masz w przegladarce
2. po co ci to w JS?
3. znajdz mi jakas funkcje, wartosc w DOMie / JS nawiazujaca do stanu zaladowanej strony
4. po co ci to?
5. http://lists.evolt.org/archive/Week-of-Mon...502/172228.html
6. czasami nawet same przegladarki przesuwaja progress bar na poczatek i tak w kolko kiedy nie znaja procentowego stanu zaladowania strony (np. serwer nie wysyla naglowka content length) - a co dopiero wykonanie tego wewnatrz przegladarki w js

7. http://www.samspublishing.com/articles/art...5&seqNum=2&rl=1
Cytat
Achieving True and Accurate Status Displays

To achieve a real page-loading status display, you can arrange for your server-side code to flush chunks of output to the client as it carries out the processing required to generate the results. These chunks of output could be client-side script that writes status details within the current browser page or even just simple <img> elements that load images to indicate progress of the operation. As an example, the MSN Expedia Web site (http://www.expedia.com) flushes partial page output to the browser, as you can see if you view the source of the page while it's searching for that holiday in Florida you keep promising your kids. However, it also uses a "dummy" animated graphic, just as this example does, which effectively indicates nothing about the actual underlying process of the operation.

* wysylasz fragment html'a i skryptu js ktory modyfikuje progress bar
* i tak w kolko do konca

i jak to wyjszie? jak proste bedzie w implementacji?...
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 26.12.2025 - 20:48