Open Popup over another Popup

Asked

Viewed 209 times

0

Can you open a popup over another popup? I have a window that opens in a popup, to register client, in this window I need to open another popup, to register or pull additional information. but every time I click the button, it does not open the popup but sends the popup that is open, to the address of the popup that was to open

I don’t put HTML, because it’s a lot of tag. but I’ll put the two scripts I’m using and the links I use

Link that opens the client registration popup

  <li><a tabindex="-1" href="javascript:newPopup()">Clientes</a></li>

Client registration script:

<script language=javascript type="text/javascript">
    function newPopup() {
        var width = screen.width;
        var height = screen.height;
        varWindow = window.open('/Gerencial/ClienteGerencial/Cliente', 'popup', "width=1353, height=646, scrollbars=no,type=fullWindow,fullscreen,scrollbars=yes, menubar=no ");
    }
</script>

Button that theoretically was to open the other popup above the client registration popup:

 <button class="btn botoes" onclick="parceiroEContador();">
                                            <img src="~/Content/iconBtn/contador_16x16.png" />
                                            Contador
                                        </button>

Script that was to open:

<script language=javascript type="text/javascript">
    function parceiroEContador() {
        //var width = screen.width;
        //var height = screen.height;
        varWindow = window.open('/Gerencial/ClienteGerencial/ParceiroEContador', 'popup', "width=600, height=600, scrollbars=no,type=fullWindow,fullscreen,scrollbars=yes, menubar=no ");
    }
</script>

That is, I can open the first client registration popup normally, but when I try to open a new pop over that popup I can’t, just redirect the current popup to the address /Gerencial/ClienteGerencial/ParceiroEContador

  • 1

    State you use modal has the Izimodal which is easy to use until too.

  • 1

    good tip, I’m reading his documentation, is very good msm, inclusive, is a better option than opening a popup over another. Thank you, I didn’t know

  • If you want to set an example with him well practice

  • 1

    opa, I do... it is not complicated, but some functions leave me with doubts.. rsrsr thanks

  • I made a reply see if you understood.

  • Thank you, I’ll test.

Show 1 more comment

1 answer

0


Modals with practical example modal Izi

Inside the body:

<button class="abrirModal">Abrir modal</butto>
<div id="modal" class="fade">
//Conteúdo do modal
<button class="outroModal">Abrir outro modal</button>
</div>

javascript:

$(document).ready(function(){
$('.abrirModal').on('click', '.abrirModal', function(event){
         event.preventDefault();
         $('#modal').removeClass('fade');
         $('#modal').iziModal('open');
});
$('#modal').iziModal({
    'title': 'Modal de texte',
    'transitionIn': 'fadeDown',
    'transitionOut: 'fadeOutUp'
});
$(document).on('click', '.outroModal', function(event){
       event.preventDefault();
       $('#outroModal').removeClass('fade');
       $('#outroModal').iziModal('open');
});
$('#outroModal').iziModal({
    'title': 'Outro modal de texte',
    'transitionIn': 'fadeDown',
    'transitionOut: 'fadeOutUp'
});
});

the class "Fade" is bootstrap but can try to use without it to see if it doesn’t keep showing up I hope I’ve helped you so far.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.