获取 iframe 中的parentWindow值

发布于 2024-12-18 03:57:59 字数 621 浏览 2 评论 0原文

我有两个 Java 网络应用程序运行不同的 JBOSS 服务器。

  • App1 - http:\10.20.34.55:8080\SpringApp1
  • App2 - http:\10.20.34.55:8089\SpringApp2

我在 App1 中使用 iFrame 来获取 App2 UI 详细信息。

<iframe src="http:\\10.20.34.55:8089\SpringApp2" ></iframe>

我可以在 App1 中获取 App2 应用程序。当我在 App2 中对 App1 进行一些更改时,它表现良好。

App1 - Parent Window
App2 - Child Window

请帮助我,当我在 App2 子窗口中执行某些操作时,我必须自动提交 App1。

我正在使用这段代码,但没有用。

parent.document.getElementById("App1Submit").click();

App1Submit - App1 提交按钮。

I am having two web applicaion in java running different JBOSS Server.

Like

  • App1 - http:\10.20.34.55:8080\SpringApp1
  • App2 - http:\10.20.34.55:8089\SpringApp2

I am using iFrame in App1 to get the App2 UI details.

<iframe src="http:\\10.20.34.55:8089\SpringApp2" ></iframe>

I am able get the App2 application in App1. When I do some changes in App2 with in App1 it's perfoming well.

App1 - Parent Window
App2 - Child Window

Please help me when I am doing some operation in App2-child window, I have to autosubmit App1.

I am using this code but no use.

parent.document.getElementById("App1Submit").click();

App1Submit - App1 submit button.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别再吹冷风 2024-12-25 03:58:00

又一个跨域 iframe 调整大小问答

我对如何通过 iframe 进行通信进行了广泛的研究,即跨域 -但它提供了多种方法和解释。

您应该考虑首先在论坛中搜索相关答案或问题。

我还强烈建议使用和学习一些 jQuery 来增强您管理 HTML 的体验。 jQuery 为您完成了所有艰苦的工作,并且非常灵活。

Yet Another cross-domain iframe resize Q&A

I did extensive research into how to communicate via iframes, that is cross domain- but it offers a variety of methods and explanations.

You should consider searching the forum first for relevant answers or questions.

I would also strongly recommend using and learning a bit of jQuery to enhance your experience in managing HTML. jQuery does all the hard work for you and is very flexible.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文