2009-09-28 7 views

Répondre

3

J'utilise cette fonction:

function ShowModalPopup(modalPopupId, zIndex) { 

    try { 
     if (modalPopupId == null) throw new Error(0, 'Incorrect value of param modalPopupId!'); 

     var modalPopupBehavior = $find(modalPopupId); 
     if (modalPopupBehavior == null) throw new Error(0, 'Not found modal popup ' + modalPopupId + '!'); 

     zIndex = typeof (zIndex) != 'undefined' ? zIndex : null; 

     if (zIndex != null) { 
     modalPopupBehavior._backgroundElement.style.zIndex = zIndex; 
     modalPopupBehavior._foregroundElement.style.zIndex = zIndex + 1; 
     } 

     modalPopupBehavior.show(); 
    } 
    catch (ex) { 
     alert('Exception in ShowModalPopup: ' + ex.message); 
    } 
    } 

et son appel:

ShowModalPopup('<%= modalpopup.ClientID %>', 20001); 
0

Vous pouvez brancher un gestionnaire à l'événement indiqué sur la ModalPopup qui vous permet de définir la zIndex:

function pageLoad() 
{ 
    var popup = $find('ModalPopupClientID'); 
    popup.add_shown(SetzIndex); 
} 

function SetzIndex(sender,args) 
{ 
    sender._container.style.zIndex=9990001; 
} 
5

J'attribue une classe CSS au panneau auquel mon modalpopupextender est assigné (PopupControlID), et je mets quelque chose comme:

.ModalSelect 
{ 
    z-index:70000 !important; 
    /*other css*/ 
} 
Questions connexes