父框架 中 有子框架弹出框 并该子框架式一个新的cgi


<div class="diag03" id="Dialog03" style="padding-top:0px;">
	<div class="diag13">
        <!-- head-box-main end  -->
        <div class="diag_main1">
        	<div class="diag_main_c1">	
        	<iframe id="mainifame" frameborder="0" src="/cgi-bh/auth_type_openldap.cgi" width="820" height="420"></iframe>
        	</div>
        </div>
        <div class="diag_footer1"></div>
        
    </div>
     <!-- diag1 end  -->
</div>



  <tr>
    <td class="tit2">认证方式:</td>
    <td colspan="3">	
    	<select name="AuthTypeId" id="AuthTypeId" class="autobox">
      </select>
      [url=javascript:void(0);]添加[/url]
      [url=javascript:void(0);]删除[/url]
    </td>
  </tr>


js:

function __getDialog1(obj,s){
	var s=localsession;
	var ww = $(window).width(), wh = $(window).height();
	var ow = $(obj).width(), oh = $(obj).height();
	var p = document.documentElement.scrollTop || document.body.scrollTop;
	var UserId=0;
	var isUser=1;
	//$(".dialog-bg").css("opacity",0.8);
	//$(".dialog-close",obj).click(function(){$(obj).hide()});
		$(obj).find("iframe").attr("src","auth_type_openldap.cgi?"+s+"&UserId="+UserId+"&isUser="+isUser);
	$(obj).css({
		"top":(wh - oh)/2+p > 0 ? (wh - oh)/2+p : 0,
		"left":(ww - ow)/2 > 0 ? (ww - ow)/2 :0
	}).fadeIn("fast");
	
	$(window).wresize(function(){
		var ww = $(window).width(), wh = $(window).height();
		var ow = $(obj).width(), oh = $(obj).height();
		var p = document.documentElement.scrollTop || document.body.scrollTop;
		//$(".dialog-bg").css("opacity",0.8);
		//$(".dialog-close",obj).click(function(){$(obj).hide()});
		$(obj).css({
			"top":(wh - oh)/2+p > 0 ? (wh - oh)/2+p : 0,
			"left":(ww - ow)/2 > 0 ? (ww - ow)/2 :0
		});
	})
}

你可能感兴趣的:(JavaScript,框架)