作者ntcbacc (心碎)
看板Ajax
標題Re: [問題] showModalDialog 的內容
時間Mon Feb 11 17:31:26 2008
母網頁:
<script type="text/javascript" language="javascript">
function DDLSelected(SelectIndex,dbid,DBRead){
if(SelectIndex==1){
var fDate='';
if(navigator.appName == "Microsoft Internet Explorer"){
fDate=showModalDialog('DrawBack.aspx?read='+DBRead+'&dbid=' + dbid
,false,'status:0;resizable:yes;scrollbars:auto;edge:sunken;dialogWidth:'+
screen.availWidth*0.8+'px;dialogHeight:'+ screen.availHeight*0.6 + 'px');
}
else{
fDate=open('DrawBack.aspx?read='+DBRead+'&dbid=' + dbid ,'退貨單
','modal=yes,width='+ screen.availWidth*0.8+',height='+
screen.availHeight*0.6 + ',resizable=yes,scrollbars=auto');
}
return false;
}}
</script>
<body>........內容<select>.....</select>......</body>
本來在子網頁中的最後面有下:
<script type="text/javascript" language="javascript">
dialogWidth=document.body.scrollWidth;
dialogHeight=document.body.scrollHeight;
</script>
但上網查聽說,showModalDialog中的網頁就不能算網頁了,
所以沒有辦法讀取.body以下的東西~
只好把寬,高度寫死了~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.115.135.156