Hi all,
When I download a file with ftp_nb_get, I'd like to show the elapsed
time and so I had insert this javascript function in my php page
<SCRIPT>
function scrivi(num, num2, num3) {
document.getEle mentById("pippo ").value=num+": "+num2+"."+num3 ;
}
</SCRIPT>
that I call when I download the file:
while ($ret == FTP_MOREDATA)
{
$ss += 1;
if ($ss == 60) {$ss = 0; $mm += 1;}
if ($mm == 60) {$mm = 0; $hh += 1;}
print "<SCRIPT> scrivi($hh,$mm, $ss); </SCRIPT>";
$ret = ftp_nb_continue ($conn_id);
}
Problem: The download is OK, but the while cycle doesn't finish
correctly because a loop is created. If I delete the javascript line,
the while cycle finish correctly.
Can someone help me?
Thanks
Cristian
P.S. Excuse me for my horrible English
When I download a file with ftp_nb_get, I'd like to show the elapsed
time and so I had insert this javascript function in my php page
<SCRIPT>
function scrivi(num, num2, num3) {
document.getEle mentById("pippo ").value=num+": "+num2+"."+num3 ;
}
</SCRIPT>
that I call when I download the file:
while ($ret == FTP_MOREDATA)
{
$ss += 1;
if ($ss == 60) {$ss = 0; $mm += 1;}
if ($mm == 60) {$mm = 0; $hh += 1;}
print "<SCRIPT> scrivi($hh,$mm, $ss); </SCRIPT>";
$ret = ftp_nb_continue ($conn_id);
}
Problem: The download is OK, but the while cycle doesn't finish
correctly because a loop is created. If I delete the javascript line,
the while cycle finish correctly.
Can someone help me?
Thanks
Cristian
P.S. Excuse me for my horrible English
Comment