在JSP页面中更新组合框而不刷新 [英] updating combobox without refreshing in JSP page

查看:77
本文介绍了在JSP页面中更新组合框而不刷新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我必须解决JSP中的一个问题。实际上,我有一个JSP页面说Ex1.jsp.In这个Ex1.jsp我有一个锚标记链接到另一个JSP页面即当我点击链接时,另一个弹出窗口将打开。我的问题是弹出窗口,父窗口有相同的组合框。如果我在弹出窗口(Ex2.jsp)中通过html表单添加数据,它进入组合框......但是父窗口(Ex1.jsp)的组合框中的数据只在我刷新父页面(Ex1.jsp)页面时才进入...那么如何在两个组合框中输入数据而不刷新???

Hi!
I have to fix a problem in JSP.Actually,i have a JSP page say Ex1.jsp.In this Ex1.jsp i have an anchor tag which links into another JSP page i.e when i click on the link another pop-up window will open.My problem is the pop-up window and the parent window has same combobox.if i add data through html form in pop-up window(Ex2.jsp) it enters the combobox...but the data in the combobox of parent window(Ex1.jsp) is entering only when i refresh the parent(Ex1.jsp) page...so how data can be entered in both comboboxes without refreshing???

推荐答案


嗨!

我必须解决JSP中的问题。实际上,我有一个JSP页面说Ex1.jsp.In这个Ex1.jsp我有一个锚标签链接到另一个JSP页面,即当我点击链接时,另一个弹出窗口将打开。我的问题是弹出窗口和父窗口具有相同的组合框。如果我在弹出窗口(Ex2.jsp)中通过html格式添加数据进入组合框......但是父窗口(Ex1.jsp)的组合框中的数据仅在我刷新父页面(Ex1.jsp)时进入...那么如何在两个组合框中输入数据而不刷新? ?
Hi!
I have to fix a problem in JSP.Actually,i have a JSP page say Ex1.jsp.In this Ex1.jsp i have an anchor tag which links into another JSP page i.e when i click on the link another pop-up window will open.My problem is the pop-up window and the parent window has same combobox.if i add data through html form in pop-up window(Ex2.jsp) it enters the combobox...but the data in the combobox of parent window(Ex1.jsp) is entering only when i refresh the parent(Ex1.jsp) page...so how data can be entered in both comboboxes without refreshing???



我不明白你在这里说的一切,但我怀疑Javascript专家可能会就此问题说几句话,所以我也会在那里复制。

I don''t understand all that you''re saying here, but I suspect a Javascript expert may be able to say a few words on the matter, so I''ll copy this there as well.



嗨!

我必须修复一个问题JSP.Actually,我有一个JSP页面说Ex1.jsp.In这个Ex1.jsp我有一个锚标签链接到另一个JSP页面,即当我点击链接时,另一个弹出窗口将打开。我的问题是流行-up窗口和父窗口有相同的组合框。如果我在弹出窗口(Ex2.jsp)中通过html格式添加数据,它进入组合框......但是父窗口组合框中的数据(Ex1.jsp)是只有当我刷新父(Ex1.jsp)页面时才进入...所以如何在两个组合框中输入数据而不刷新???
Hi!
I have to fix a problem in JSP.Actually,i have a JSP page say Ex1.jsp.In this Ex1.jsp i have an anchor tag which links into another JSP page i.e when i click on the link another pop-up window will open.My problem is the pop-up window and the parent window has same combobox.if i add data through html form in pop-up window(Ex2.jsp) it enters the combobox...but the data in the combobox of parent window(Ex1.jsp) is entering only when i refresh the parent(Ex1.jsp) page...so how data can be entered in both comboboxes without refreshing???



你可以通过window.opener()方法获得父窗口的引用。

一旦你有父窗口引用,你就可以了可以通过简单的javascript向选择框添加选项。

you can have a reference of the parent window by window.opener() method.
Once you have the parent window reference, you can add options to the select box by simple javascript.



你可以通过window.opener()方法获得父窗口的引用。

获得父窗口引用后,可以通过简单的javascript向选择框添加选项。
you can have a reference of the parent window by window.opener() method.
Once you have the parent window reference, you can add options to the select box by simple javascript.



谢谢你我会用window.opener()来试试......

Thank u i''ll try it with window.opener() ...


这篇关于在JSP页面中更新组合框而不刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆