If the upload is being carried out via POST of the form, the page makes refresh to send the data.
If the upload is being carried out via Ajax, can use a global variable to control upload status:
var variavelGlobalControloUpload;
function minhaFuncaoUpload() {
// upload começou, dar a conhecer à variavel de controlo
variavelGlobalControloUpload = 'a carregar';
}
function atualizaPagina () {
// Verifica se não está a carregar
if (variavelGlobalControloUpload != 'a carregar') {
// codigo para atualizar a pagina aqui!
}
}
Note: This is a concept, you must adapt the same to your reality.
How are you updating the page? With
meta
or javascript?– KaduAmaral
edited the question, I’m using Javascript
– Carlos Pereira