Popup not close when uploads finish

XUpload related questions

Moderator: admin

Message
Author
natxo
Posts: 1
Joined: Sep 13, 2010 1:16 pm

Popup not close when uploads finish

#1 Postby natxo » Sep 13, 2010 1:26 pm

Hi!

I have pro version and all works good except when i want to get my popup closes automatically when upload finishes. I put a checkbox in my popup html "Close window when finish" and there's a function like this in the xstatus.js file:

function ClosePopUp()
{
if(doc.getElementById('close_finished') && document.getElementById('close_finished').checked==true)self.close();
}

finally i put a function call in upload_status.cgi file to call this function just here:

f(grep{/^uploaded$/i}@$msgs) #finished upload
{
$files++;
print"S('100','$totalKB','$time','$speedKB','$files',0);";
print"if(document.getElementById('stop_btn')){document.getElementById('stop_btn').style.display='none';}";
print qq{ClosePopUp();};
}
else
{
print qq{S('$percent','$currentKB','$time','$speedKB','$files','$estimate');} unless $uploaded;
}

then the popup sometimes closes sometimes not, how can i get to close it always? Thanks.

Return to “XUpload”

Who is online

Users browsing this forum: No registered users and 0 guests