popup


Title: Display the pop up.

Description: We have a requirement that require to enter the existing Employee name in Textbox, but we need to see who are there in list existing item. To full fill the that we are clicking on View button and need to display the items in pop up window.

Code:

<script language="javascript" type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> 


<script language="javascript" type="text/javascript"> 
    $(document).ready(function() { 
        $("#btnDisplayPopup").click(function(){
            DisPopUp();
        });
    }); 

function DisPopUp() { 
       
    var options = { 
        url:'https://office365.sharepoint.com/sites/lakku/Lists/Infolist/AllItems.aspx',
        title: 'Employees', 
        allowMaximize: false, 
        showClose: true, 
        width: 500, 
        height: 350 
    }; 
      
    SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options); 
    return false; 

</script> 
Enter Employe Name <input type="text"  />
<input type="button" id="btnDisplayPopup" value="View"/>



Out Put: