【发布时间】:2015-03-03 10:49:20
【问题描述】:
我在框架集中有一个框架如下:
<frameset rows="75%,25%">
<frameset cols="20%,80%">
<frame src="TreeGroup.jsp" name="left" id="f1"/>
<frame src="DisplayMap.jsp" name="top" id="f2"/>
</frameset>
<frame src="Tabs.jsp" name="bottom"/>
</frameset>
在框架f1 中我有context menu 选项,所以如果我在框架f1 中单击AddVehicle 选项,它应该在框架2 (f2) 中打开新的jsp/html。所以在 Javascript 函数中我是这样做的,
function addVehicle()
{
alert("In addVehicle");
//parent.top.location.href="http://localhost:8080/ITS_Server/Vehicle_Registration.jsp";
top.frames['top'].location.href = "http://localhost:8080/ITS_Server/Vehicle_Registration.jsp?gname="+grp_name+"&did="+'<%=uid%>', "toolbar=yes, scrollbars=yes, resizable=yes, top=100,bottom=200, left=200, width=900, height=500";
}
这里我面临的问题是,top.frames['top'].location.href 只有在我删除 URL 的所有参数并且它没有在 f2 框架中打开它在一个完整窗口中打开时才能正常工作。如何解决这个问题,请任何人帮助我。
【问题讨论】:
标签: javascript html jsp frame frameset