我的页面用了框架,将页面分成上下两部分topFrame和mainFrame
现在想实现在topFrame里点击一个button,触发mainFrame里的一个fuction。请问怎么样实现?
我现在在topFrame里用的是window.mainFrame.tosubmitFrame(xxxx)方法。将xxxx传到mainFrame里。不过出现jsp的error。
或者哪位大虾能告诉我,怎么样将上面的页面输入的值通过jsp传到下面的页面里
谢谢了
现在想实现在topFrame里点击一个button,触发mainFrame里的一个fuction。请问怎么样实现?
我现在在topFrame里用的是window.mainFrame.tosubmitFrame(xxxx)方法。将xxxx传到mainFrame里。不过出现jsp的error。
或者哪位大虾能告诉我,怎么样将上面的页面输入的值通过jsp传到下面的页面里
谢谢了
<FRAMESET rows="180,*" frameborder="yes" border="1" framespacing="1">
<FRAME src="<%=ctxPath%>/pages/rcs/RCS1100_input_head.jsp" name="topFrame" frameborder="yes" scrolling="NO" noresize >
<FRAME src="<%=ctxPath%>/pages/rcs/RCS1100_input_main.jsp" name="mainFrame">
</FRAMESET>
这是RCS1100_input_main.jsp中的方法
<script language="javascript">
function tosubmitFrame(syoId){
window.document.forms[0].shokuinBangou.value=syoId;
window.document.forms[0].target="_self";
window.document.forms[0].submit();
}
</script>
这是RCS1100_input_head.jsp页面传值的onclick()
onclick="window.mainFrame.tosubmitFrame('window.document.forms[0].shokuinBangou.value')
请指教
在onclick="window.mainFrame.tosubmitFrame('window.document.forms[0].shokuinBangou.value')
传值的时候
你有没有考虑target这个参数呢?
parent.mainFrame.tosubmitFrame(xxxx);
或者parent.mainFrame.document.tosubmitFrame(xxxx);
不过,我觉得你的问题完全可以进行转化处理,
将以下代码放在你的TOP中去写,
window.document.forms[0].shokuinBangou.value=syoId;
window.document.forms[0].target="_self";
window.document.forms[0].submit();
因为从TOPFRMAE中调用MAINFRAME中的FROM是完全可以做到的,我用过很多次,但没有用过调用
JAVASCRIPT方法,
欢迎交流,msn:[email protected]