Jump to content
Fórum Script Brasil
  • 0

Script Popu


Headphone
 Share

Question

Olá galera, tenho um script aque que funciona normal como deve...

Mais no Google Chrome não funciona normal. (Alguém poderia verificar para mim e dizer o que falta)

timer = null;
ventana = null;
n = 30;
aviso = false;

function fnPopup(){
    ventana = window.open('http://www.meusite.com/POPUPbanner', 'popup', 'scrollbars=1,resizable=1,width=730,height=730,left=150,top=150');
    $('input[name=btnTransload]').val('30');
    $('input[name=btnTransload]').attr('disabled','disabled');
    timer = setInterval("empieza_contar()", 1000);
}

function empieza_contar(){
    if(ventana != null){
        if(ventana.closed){
            alert('não feche o Popup Antes de 30 Segundos');
            clearInterval(timer); n = 30;
            $('input[name=btnTransload]').val('Transload');
            $('input[name=btnTransload]').removeAttr('disabled');
            return;
        }
        if(ventana.frames.length == 3){
            return false;
        }else{
            n = n - 1;
            $('input[name=btnTransload]').val(n);
            if(n == 0){
                clearInterval(timer);
                $('input[name=btnTransload]').remove();
                $('input[name=B2]').before('<a href="#">Continuar</a>');
            }
        }
    }
}

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      150.9k
    • Total Posts
      648.8k
×
×
  • Create New...