Abaixo vamos ver como fazer uma barra de progresso para processos. Estamos utilizando como exemplo o envio de uma mala direta atrav�s de registros contidos em um bd. <html> <body> <? echo $largura; ?> <table border="1" cellspacing="0" cellpadding="0" style="width:200px; border:1px solid #999999"> <tr><td colspan="2">Carregando...</td></tr> <tr> <td><div id="progresso" name="progresso" style="width:1px;background-color:#990000"></div></td><td width="100" style="background-color:#990000"><div id="porcentagem" style="font-family:verdana; font-size:12px; color:#FFFFFF"></div></td> </tr> <tr><td><div id="nlinha" name="nlinha" style="font-family:verdana; font-size:12px; color:#990000"></div></td><td> <div id="nlinhas" name="nlinhas" style="font-family:verdana; font-size:12px; color:#990000"></div></td></tr> </table> </body> </html> <? A CONEXAO COM O BD DEVE SER COLOCADA AQUI $usuarios=mysql_query("Select * from tabela"); //Buscamos registros da tabela $nlinhas=mysql_num_rows($usuarios); // Verificamos quantas linhas foi retornado; if (empty($n)) { $n=1; } else { $n=$n; } while($usuario=mysql_fetch_array($usuarios)) { // Fazemos o loop $total=$nlinhas; $n=$n+1; if ($total <> "" and $total>=$n) { $largura=$n*100/$total; $largura = substr($largura,0,4); $recipient=$usuario[email]; $subject="TITULO EMAIL"; $msg=' MENSAGEM DO EMAIL'; $headers = "From: <newsletter@news.com>\n"; $headers .= "X-Sender: <newsletter@news.com>\n"; $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; mail ($recipient,$subject,$msg,$headers); echo "<script> function progresso() { document.getElementById('progresso').style.width='".$largura."'; document.all.porcentagem.innerHTML = '".round($largura)."%'; document.all.nlinha.innerHTML = '".$n."'; document.all.nlinhas.innerHTML = '".$nlinhas."'; } </script> "; echo '<script>progresso()</script>'; } else {}} ?> Espero que entendam o Script. Caso tenham alguma duvida. Favor enviar para btgf@hotmail.com