0
可以接收来自 的IFrame后面的代码(ID和点对多点)已发送的参数的JavaScript弹出,然后将其发送到页面父在javascript中接收函数参数?
代码的IFrame
protected void btnConfirm_Click(object sender, EventArgs e)
{
EDPBLL = new EDPLogic();
int id = EDPBLL.Add(Convert.ToInt32(Request.QueryString["EDP"]), Convert.ToInt32(Session["userId"]), DateTime.Now, Convert.ToInt32(ddlPrensa.SelectedValue));
string numeroEDP = EDPBLL.generarNumeroEDP(id);
EDPBLL.UpdateEdpCode(id, numeroEDP);
Session["pEDPId"] = id;
Session["numeroEDP"] = numeroEDP;
int pTmp = 4;
ScriptManager.RegisterStartupScript(Page, GetType(), "Popup", "<script>Popup('"+id+"','"+pTmp+"')</script>", false);
}
的脚本模拟点击事件父窗口的
编写JavaScript代码的.aspx
<script type="text/javascript">
function Popup() {
$("#MainContent_btnPrueba", window.parent.document).trigger("click");
}
</script>
请使用您需要的iframe以最简单的形式隔离您的代码。我们不一定需要查看特定于应用程序的代码,只是一个简单的孤立示例,显示您正在尝试完成的任务。 – istos 2014-11-01 03:57:24