需在页面先设置
<f:Window ID="Window1" runat="server" Height="600px" Width="800px" IsModal="true" EnableMaximize="True"
CloseAction="HidePostBack" EnableIFrame="True" Hidden="True" Icon="ApplicationFormEdit"
Target="Top" EnableResize="True">
</f:Window>
前台弹层写法
<a href="javascript: <%#Window1.GetShowReference("add_Order_Pro.aspx?Pro_Id=" +Eval("Pro_Id"),"我要下单") %>"> 下单 </a>
<a href="javascript:<%#Window1.GetShowReference("show_Pro_Order.aspx?OrderId=" + Eval("OrderId"),"订单详细") %>"><%#Eval("OrderId") %></a>
<script type="text/javascript">
function show_Frame(pro_id, name, url) {
//var u = 'Ck_Admin/' + url + '.aspx?Pro_Id=' + pro_id;
var u = ' <%=Zy.PageHelper.getUrl( "Ck_Admin")%>' + url + '.aspx?Pro_Id=' + pro_id;
F( 'Window1').f_show(u, name);
}
</script >
<a href="javascript:void(0);" onclick="show_Frame('<%# Eval( "Sp_Id") %>','查看商品','show_Pro')">
<%# Eval("Order_No") %></ a>
js方法中
<script>
function showWindow() {
F('Window1').f_show( '/e1.xc5.net_new/Fxs_Admin/2.aspx?Id=46' , '查看库存');
}
</script >
<a href="#" onclick="return chk_Auto_Add_Order_Para();">
<img src="../Images/btn_Ddznsc.gif" border="0" /></a >
后台grid弹层写法:
protected void grid_RowCommand(object sender, FineUI. GridCommandEventArgs e)
{
object[] keys = this .rpt_Pro_List.DataKeys[e.RowIndex];
string id = keys[0].ToString();
switch (e.CommandName)
{
case "show" :
PageContext.RegisterStartupScript(
Window1.GetShowReference( "Update_Pro_Kuc.aspx?Pro_Id=" + id + "&action=modify", "查看库存" ));
break;
}
}
后台输出拼串:
<a href=\"javascript:F('Window1').f_show('" + getUrl("ck_admin") + "Pro_Sku_Proc_List.aspx?Kuc_Sku_Warn=" + Kuc_Sku_Warn + "')\">
"<a href=\"javascript:F('Window1').f_show( 'show_Pro_Order.aspx?OrderId=" + dt.Rows[i]["OrderId"] + "' , '查看库存');\"> 查看库存</a>"
//弹层最大化
PageContext.RegisterStartupScript(Window2.GetShowReference() + Window2.GetMaximizeReference());
F('Window1').f_show('','');F('Window1').f_maximize();
// 设置弹窗到右下角
<script>
Ext.onReady(function () {
var window1 = F(' <%=Window1.ClientID %>' );
//alert(window1.getHeight() + "-" + window1.getWidth());
window1.setX($(window).width() - window1.getWidth());
window1.setY($(window).height() - window1.getHeight());
});
</script>