从子窗口获取数据
可能的重复:
从子窗口获取数据
我正在开发一个项目并遇到了问题。请查看以下代码。
<iframe name="stus" id="stus" style="display:none;"></iframe><div id="posting"></div>
<form name="water" id="water" method="post" autocomplete="off" action="components/com_pocketsea/assets/new/water.php" target="stus">
<input text="text" id="newwatermark" name="newwatermark"><input type="submit"></form>
water.php 的代码是
<?php $tt = $_POST['newwatermark']; ?>
<script type="text/javascript" src="../../js2/jquery.min.js" ></script>
<script> $(document).ready(function(){ $("#posting", window.parent.document).html("<?php echo $tt; ?>").fadeIn('slow'); }); </script>
该脚本不起作用。 Water.php 未加载到父级中。这在自定义中效果很好,但在 joomla 中则不然。请帮忙。
Possible Duplicate:
getting data from child window
I am working on a project and have encountered a problem. Please view the following code.
<iframe name="stus" id="stus" style="display:none;"></iframe><div id="posting"></div>
<form name="water" id="water" method="post" autocomplete="off" action="components/com_pocketsea/assets/new/water.php" target="stus">
<input text="text" id="newwatermark" name="newwatermark"><input type="submit"></form>
The code for water.php is
<?php $tt = $_POST['newwatermark']; ?>
<script type="text/javascript" src="../../js2/jquery.min.js" ></script>
<script> $(document).ready(function(){ $("#posting", window.parent.document).html("<?php echo $tt; ?>").fadeIn('slow'); }); </script>
The script is not working. Water.php is not being loaded in parent. This works well in custom but not in joomla. plz help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
opener
方法访问父窗口元素...you can use
opener
method to access parent window element...