简体   繁体   中英

Open another Popup window within a popup window?

I have these two codes. "win2" is what I open first, then when I'm trying to open "win". It doesn't do anything. Please tell me what is wrong

    var win;
    function viewTicketDetails() {
        win = window.open('ViewTicketDetailsPage.aspx'
                                , 'TicketDetails'
                                , 'width=1040, height=600, innerHeight=600, location=no, menubar=no, status=no, titlebar=no, scrollbars=yes, left=0'
                                , '_blank'); 
       win.focus();
    };


    var win2;
    function viewTicketHistory() {
        win2 = window.open('AffectedUserHistoryPage.aspx'
                                , 'Ticket History'
                                , 'width=1040, height=300, innerHeight=300, location=no, menubar=no, status=no, titlebar=no, scrollbars=yes, left=0'
                                , '_blank');
        win2.focus();
    };

You need to write viewTicketsDetaisl() in the page from where you want to open the second window. viewTicketDetails should be written in AffectedUserHistoryPage.aspx .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM