Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1793 connectés 

  FORUM HardWare.fr
  Programmation
  PHP

  Comment affiche une page d'attente pendant l'execution d'un script ?

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Comment affiche une page d'attente pendant l'execution d'un script ?

n°734526
misterping​uin
Posté le 22-05-2004 à 10:17:56  profilanswer
 

Bonjour, j'ai des scripts prenant un certain temps à s'exécuter, et j'aurais voulu connaitre les différentes solutions pour afficher un message d'attente pendant l'execution d'une boucle, d'une requete SQL ou autre ?
 
Merci

mood
Publicité
Posté le 22-05-2004 à 10:17:56  profilanswer
 

n°734528
black_lord
Truth speaks from peacefulness
Posté le 22-05-2004 à 10:26:31  profilanswer
 

script en quoi ???

n°734621
misterping​uin
Posté le 22-05-2004 à 13:03:39  profilanswer
 

ben sauf erreur j'ai posté dans php...

n°734624
black_lord
Truth speaks from peacefulness
Posté le 22-05-2004 à 13:09:04  profilanswer
 

oops :whistle:
 
A priori non parce que le php est éxécuté coté serveur et ensuite envoyé aux clients.

n°734637
T509
$job->GetJob(now)
Posté le 22-05-2004 à 13:27:22  profilanswer
 

regarde comment fait la SNCF
 
ils envoient sur une page d'attente intermédiaire qui elle lance le script réel en JS
 

Code :
  1. <html>
  2. <head>
  3. <title>Merci de patienter</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <meta http-equiv="pragma" content="no-cache">
  6. <meta http-equiv="cache-control" content="no-cache">
  7. <meta http-equiv="expires" content="mon, 20 mar 2000 16:30:01 gmt">
  8. <link rel="stylesheet" href="/images/booking_engine/vscv8main.css" type="text/css">
  9. <script language="javascript">
  10. function sendValidationCommand(){
  11. document.saisie.submit();
  12. }
  13. </script>
  14. </head>
  15. <body text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="javascript:sendValidationCommand()">
  16. <form  name="saisie" action="http://www.voyages-sncf.com/dynamic/_SvTermCommVoySaisieAttente?_TMS=1085224867601&_DLG=SvTermCommVoySaisieAttente&_LANG=FR&_AGENCY=VSC&_AGENCY=VSC" method="POST" >
  17. <input type="hidden" name="_CMD" value="cmdValidation" >
  18. <input type="hidden" name="_DLG" value="SvTermCommVoySaisieAttente" >
  19. <input type="hidden" name="hf_help" value="null" >
  20. <table border="0" cellpadding="0" cellspacing="0" width="100">
  21. <tr>
  22.   <td colspan="2"><IMG src="/images/bandeditexp/logo_vsc_hor.gif" border=0></td>
  23. </tr>     
  24. <tr>
  25.   <td colspan="2"><img height="12" src="/images/b.gif" width="1"></td>
  26. </tr>
  27. </table>
  28. <hr size="1" color="#BDD2E5">
  29. <table border="0" cellpadding="0" cellspacing="0" height="70%" width="100%">
  30. <tr>
  31.   <td align="center" valign="middle">
  32. <!-- PubTag -->
  33. <script language="Javascript" SRC="http://ad.fr.doubleclick.net/adj/sncfintertitieltrain1.fr/lance_pub_pageattenteresa;sz=1X1;kw=d59FRLIL;kw=a75FRPAR;kw=c2;kw=nf;kw=pg4;kw=np1;ord=58717629?"></script>
  34. <!-- Fin PubTag -->
  35. <table border="0" cellpadding="0" cellspacing="0">
  36. <tr>
  37.   <td align="center"><img src="/images/b.gif" width="1" height="30"></td>
  38. </tr>
  39. <tr>
  40.   <td class="txtcourantplus" align="center">Nous recherchons les meilleurs prix disponibles.</td>
  41. </tr>
  42. <tr>
  43.   <td><img src="/images/b.gif" width="1" height="3"></td>
  44. </tr>
  45. <tr>
  46.   <td class="txtcourantplus" align="center">Merci de patienter quelques secondes.</td>
  47. </tr>
  48. <tr>
  49.   <td><img src="/images/b.gif" width="1" height="15"></td>
  50. </tr>
  51. </table></td>
  52. </tr>
  53. </table>
  54. </form>
  55. </body>
  56. </html>


Message édité par T509 le 22-05-2004 à 13:27:43

---------------
fermez vos topics résolus avec le tag [Résolu] en fin de titre. Merci !
n°734654
misterping​uin
Posté le 22-05-2004 à 13:47:48  profilanswer
 

si je comprends bien le principe est d'envoyer les données à une page d'attente, qui les renvoit à son tour au script ? cela semble en effet relativement simple en js, mais n'y a t il pas des solutions en php avec les fonctions d'envoi de données au navigateur ?  
 
j'ai essayé de regardé les ob_start(), flush() and co mais j'avoue ne pas y avoir tout compris...
 
merci

n°734655
T509
$job-&gt;GetJob(now)
Posté le 22-05-2004 à 13:49:20  profilanswer
 

Cela ne marchera pas puisqu'ensuite pour rediriger vesr la page de résultat, tu as besoin de header qui ne fonctionne que si rien n'a été envoyé au client


---------------
fermez vos topics résolus avec le tag [Résolu] en fin de titre. Merci !

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  PHP

  Comment affiche une page d'attente pendant l'execution d'un script ?

 

Sujets relatifs
[C#] choix dans combobox -> affiche les résultats du datagrid ?Une page ou l'on affiche des images du site (banier,logo) ca se nomme?
script bug avec IE [contourné][Python] charset, coding, accents et page html
Script Audio[C#] Afficher un document word dans une page
Inserer des script tout fait???creer une page internet qui s'affiche sur un portable
Plus de sujets relatifs à : Comment affiche une page d'attente pendant l'execution d'un script ?


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR