如何实现父子窗口并从子窗口向父窗口传递值?
我正在开发 ASP.NET MVC 2 应用程序。
在我的一份数据输入表单中,我有一个“雇主”字段,旁边有一个“搜索”链接。当用户单击此链接时,将打开另一个带有搜索表单的窗口。用户使用搜索表单来搜索正确的雇主。向用户显示雇主列表。目前,用户必须将正确的雇主从子窗口复制并粘贴到原始窗口中。
我想实现它,以便子窗口中的每个雇主搜索结果都是一个超链接。然后,用户将单击正确的雇主,然后正确的雇主值将填充到原始父窗口雇主字段中。
我将如何在 ASP.NET MVC 2 中实现这一点?
I am working on an ASP.NET MVC 2 application.
In one of my data entry forms, I have an "employer" field which has a "search" link next to it. When a user clicks on this link, another window is opened with a search form. The user uses the search form to search for the correct employer. A list of employers is shown to the user. Currently, the user has to then copy and paste the correct employer from the child window into the original window.
I want to implement it so that each employer search result in the child window is a hyperlink. The user would then click on the correct employer and then the correct employer value would be populated in the original parent window employer field.
How would I go about implementing this in ASP.NET MVC 2?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
就我个人而言,我不会使用新窗口,而是使用模式对话框。 jQuery UI 有一个很好的模式对话框,您可以使用 AJAX 加载它
Personally I would not use a new window but a modal dialog. jQuery UI has a nice modal dialog that you could load using AJAX