473,569 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

updating combobox without refreshing in JSP page

46 New Member
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???
Jul 26 '07 #1
13 7435
r035198x
13,262 MVP
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???
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.
Jul 26 '07 #2
sumittyagi
202 Recognized Expert New Member
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???
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.
Jul 26 '07 #3
honey99
46 New Member
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.
Thank u i'll try it with window.opener() ...
Jul 26 '07 #4
honey99
46 New Member
Thank u i'll try it with window.opener() ...
will anyone tell me the solution for my problem
Jul 26 '07 #5
sumittyagi
202 Recognized Expert New Member
will anyone tell me the solution for my problem
have you tried window.opener() .

If yes then paste your code here, we will see what's wrong with that.
If no then no-body on any forum on this site like spoon-feeders.
Jul 26 '07 #6
honey99
46 New Member
have you tried window.opener() .

If yes then paste your code here, we will see what's wrong with that.
If no then no-body on any forum on this site like spoon-feeders.
Thanks for u r reply..
i'm posting me code here...plz go through the code and tell me a solution

Ex1.jsp

<a href="Ex.Action " target="_blank" onclick="window .open(this.href ,'newwindow','w idth=700,height =500,scrollbars =yes');return false;">click here</a>

<td class="flabel" width="240" nowrap>

Select.draw(out , mod.getConnectS tring(),"cmb"," Style", "Width:130p x", -1, true, " onfocus='javasc ript:fcolor(thi s)'; onblur='Javascr ipt:bcolor(this )' onchange='javas cript:textChang e(this);' ",some SQL query;",new String[]{"id"},new String[]{"value"}, model.get() , some SQL query);

Ex2.jsp

<td colspan=3 align='left' nowrap class="formdata ">
<select name=chr_txtsel ect style='width=30 0px;' onChange="JavaS cript:changecom bo(this);">

How can i update both comboboxes without refreshing in both the JSP pages i.e.if i enter data in Ex2.jsp,it should enter in combobox of Ex1.jsp also without refreshing???ho w can i get this??any solution....... ...............
Jul 27 '07 #7
anilraghuvanshi
4 New Member
Thanks for u r reply..
i'm posting me code here...plz go through the code and tell me a solution

Ex1.jsp

<a href="Ex.Action " target="_blank" onclick="window .open(this.href ,'newwindow','w idth=700,height =500,scrollbars =yes');return false;">click here</a>

<td class="flabel" width="240" nowrap>

Select.draw(out , mod.getConnectS tring(),"cmb"," Style", "Width:130p x", -1, true, " onfocus='javasc ript:fcolor(thi s)'; onblur='Javascr ipt:bcolor(this )' onchange='javas cript:textChang e(this);' ",some SQL query;",new String[]{"id"},new String[]{"value"}, model.get() , some SQL query);

Ex2.jsp

<td colspan=3 align='left' nowrap class="formdata ">
<select name=chr_txtsel ect style='width=30 0px;' onChange="JavaS cript:changecom bo(this);">

How can i update both comboboxes without refreshing in both the JSP pages i.e.if i enter data in Ex2.jsp,it should enter in combobox of Ex1.jsp also without refreshing???ho w can i get this??any solution....... ...............
Hi,

You can do this thing using AJAX.
try to implement this.
Jul 27 '07 #8
honey99
46 New Member
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???

--------------------------------------------------------------------------------

i'm posting me code here...plz go through the code and tell me a solution

Ex1.jsp
Expand|Select|Wrap|Line Numbers
  1. <a href="Ex.Action" target="_blank" onclick="window.open(this.href,'newwindow','width=700,heigh t=500,scrollbars=yes');return false;">click here</a>
  2.  
  3. <td class="flabel" width="240" nowrap>
  4.  
  5. Select.draw(out, mod.getConnectString(),"cmb","Style", "Width:130px", -1, true, " onfocus='javascript:fcolor(this)'; onblur='javascript:bcolor(this)' onchange='javascript:textChange(this);' ",some SQL query;",new String[]{"id"},new String[]{"value"}, model.get() , some SQL query);
  6.  
Ex2.jsp
Expand|Select|Wrap|Line Numbers
  1. <td colspan=3 align='left' nowrap class="formdata">
  2. <select name=chr_txtselect style='width=300px;' onChange="javascript:changecombo(this);">
  3.  
How can i update both comboboxes without refreshing in both the JSP pages i.e.if i enter data in Ex2.jsp,it should enter in combobox of Ex1.jsp also without refreshing???ho w can i get this??any solution....... ...............

can anyone tell how to solve this problem through AJAX????????
Jul 27 '07 #9
pbmods
5,821 Recognized Expert Expert
Heya, honey99.

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.
Jul 27 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1757
by: mark | r | last post by:
anyone know how to update the inforation in a select box without refreshing the page or using massive javascript arrays using regular asp (not .net)? thanks mark
4
1524
by: Derek | last post by:
I am trying to refresh one datagrid after updating another datagrid. I can not call BindData for one under the other bind sub because it creates an endless loops on page load. Is there way to rebind without the loop or how could I call page.refresh or at least close the window after one datagrid is updated. Any help? Thanks in advance...
9
5806
by: Jervin Justin | last post by:
Hi, I've been having this problem for some time with Web Forms: I have a web app that sends data to a service when the user presses a button. Based on the data, the server will send several replies. Since there is no way for a service to post to a client, I am using a thread on the client that polls the server for updates. (Feel free to...
0
3163
by: lv2compute | last post by:
I am having a problem with my datagridview. I have a small table that has two columns. The first column is bound to my dataset. The second column is a combobox. I add items to the combobox based on the information that I get from a text file. I then try to set the value of the combobox to a specific value based on the first column. The code...
9
1899
by: paul | last post by:
Hi All, We have a small dilemma. We have the following page: http://giggsey.com/m00Cow.php (don't ask about the content) that we want to turn into an interactive application for some new intake students at our school. However - we want to have multiple client PCs running a web interface that will allow them to type in their name / a...
4
2135
by: honey99 | last post by:
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...
1
1729
by: honey99 | last post by:
Hi! i have a same combobox in parent window and child window.If i enter a value in combobox in child window it should automaticall update in parent window without refreshing the parent window page.I know it is possible with window.opener...but i dont know how to implement that function...can anybody explain me with some example..
2
3301
by: =?Utf-8?B?VmFuZXNzYQ==?= | last post by:
Hi All! I am with a situation where I am not getting the right updating to the form's fields. The situation is the following one: I have one combobox and one textbox. I am using the CurrentChanged event of the BindingSource of the combobox to update the textbox. When selecting an item in the combobox or when selecting a row in the grid,...
4
2664
by: Mtek | last post by:
Hi, We have a combo box on our page, which gets populated via a MySQL Query in PHP. What we want to do is to print the values on the page in a table that correspond the to selection from the combo box without a page refresh. I assume that I'll need to query ALL the needed values from the database and store them in an array This can be...
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7974
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.