RE: [PHP-ES] Leyenda "En proceso"
| From: | Gordon Gekko | Date: | Tue, 30 Oct 2001 19:50:32 +0000 |
| Subject: | RE: [PHP-ES] Leyenda "En proceso" | ||
| References: | 1 2 3 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-15312@lists.php.net to get a copy of this message | ||
ejemplo con un poco de código ...
imáginemonos que tenemos 2 gifs ... enproceso.gif (gif animado) y vacio.gif (uno en blanco)
--- inicio de prueba.php ---
<HTML>
<HEAD><TITLE>Prueba</TITLE>
</HEAD>
<BODY>
<center><IMG SRC=enproceso.gif name=enproceso></center>
<?php
flush();
// aqui iría el proceso pesado ....
?>
<!-- ahora cambiamos la imagen -->
<script>
function SwitchImg()
{ //start
var rem, keep=0, store, obj, switcher=new Array, history=document.Data;
for (rem=0; rem < (SwitchImg.arguments.length-2); rem+=3) {
store = SwitchImg.arguments[(navigator.appName == 'Netscape')?rem:rem+1];
if ((store.indexOf('document.layers[')==0 && document.layers==null) ||
(store.indexOf('document.all[')==0 && document.all==null))
store =
'document'+store.substring(store.lastIndexOf('.'),store.length);
obj = eval(store);
if (obj != null) {
switcher[keep++] = obj;
switcher[keep++] = (history==null || history[keep-1]!=obj)?obj.src:history[keep];
obj.src = SwitchImg.arguments[rem+2];
} }
document.Data = switcher;
} //end
SwitchImg('document.enproceso' ,'document.enproceso,'vacio.gif');
<script>
<?php
// aqui ya mostramos los datos que queramos
?>
</body></html>
--- fin de prueba.php ---
_.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-.
El 30/10/2001 14:25, christian macazana Escribia sobre "RE: [PHP-ES] Leyenda "En
proceso"" :
>como se aplicaria si el gif animado para mostrarlo escribis html? y el
>resultado de la consulta es otra parte de html!!!
>
>o me perdi de algo?
>
>
>
>
>
>
>christian
>
>----- Original Message -----
>From: Gordon Gekko <g.gekko@arrakis.es>
>To: <lista@phpes.com>
>Sent: Tuesday, October 30, 2001 2:08 PM
>Subject: Re: [PHP-ES] Leyenda "En proceso"
>
>
>Yo hago algo que quizás no es muy 'limpio' pero funciona ...
>voy enviando la página ... y envio una imagen que es un gif animado con un
>texto indicando 'proceso en curso'
>cuando termina la consulta cambio la imagen por otra vacia ... y empiezo a
>mostrar el resultado ... funciona ... ;-)
>
>
>_.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-.
>El 30/10/2001 15:45, Gaffuri Emiliano Escribia sobre "[PHP-ES] Leyenda "En
>proceso"" :
>
>>Tengo una consulta que tarda mucho (SQL) la hago por medio de PHP hay
>>alguna forma de que mientras se realiza la consulta me aparezca un cartel
>>diciendo en proceso o una barrita que se valla cargando??.
>>Gracias.
>
>_.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-.
>
>
>---------------------------------------------------------------------
>Archivo On-line: http://www.phpes.com/
>Manual PHP en español: http://www.php.net/manual/es/
>Para dar de baja la suscripción, mande un mensaje a:
> lista-unsubscribe@phpes.com
>
>
>
>_________________________________________________________
>
>Do You Yahoo!?
>
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>
>
>---------------------------------------------------------------------
>Archivo On-line: http://www.phpes.com/
>Manual PHP en español: http://www.php.net/manual/es/
>Para dar de baja la suscripción, mande un mensaje a:
> lista-unsubscribe@phpes.com
_.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-.