2013-10-15 158 views
0

我有一个JQuery弹出窗口,我已经脚本如下。JQUERY弹出窗口的高度

<style> 
    .ui-widget-overlay { 
     position: absolute; 
     top: 0; 
     left: 0; 
     width: 100%; 
     height: 100%; 
     background-color: #000; 
     opacity: 0.7; 
     z-index: 0; 
    } 

</style> 

var wWidth = $(window).width(); 
     var dWidth = wWidth * 0.85; 
     var wHeight = $(window).height(); 
     var dHeight = wHeight * 0.85; 
     $('#QualifyLead').dialog({ 
      autoOpen: false, 
      draggable: false, 
      resizable: false, 
      bgiframe: false, 
      modal: true, 
      width: dWidth, 
      height: dHeight, 
      closeOnEscape: false, 
      title: "Enter Qualify Lead Information", 
      open: function (type, data) { 
       $(this).parent().appendTo("form"); 
      } 
     }); 

Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(function (evt, args) { 
     var wWidth = $(window).width(); 
     var dWidth = wWidth * 0.85; 
     var wHeight = $(window).height(); 
     var dHeight = wHeight * 0.85; 
     $('#QualifyLead').dialog({ 
      autoOpen: false, 
      draggable: false, 
      resizable: false, 
      bgiframe: false, 
      modal: true, 
      width: dWidth, 
      height: dHeight, 
      closeOnEscape: false, 
      title: "Enter Qualify Lead Information", 
      open: function (type, data) { 
       $(this).parent().appendTo("form"); 
      } 
     }); 
    }); 

这有一个问题。当我在网格中有很多记录时(A单击网格的按钮打开弹出框),我必须滚动才能看到最后一行。当我点击最后一行的按钮时,弹出窗口不适合窗口的高度。你可以查看附件截图。

Popup issue in JQuery

我缺少什么?

+0

没有你的问题就解决了? – Dhaval

回答

0

相反的:

var wHeight = $(window).height(); 

试试这个:

var wHeight = $(window).css("height");