updating combobox without refreshing in JSP page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • honey99
    New Member
    • Jul 2007
    • 46

    updating combobox without refreshing in JSP page

    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???
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by honey99
    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.

    Comment

    • sumittyagi
      Recognized Expert New Member
      • Mar 2007
      • 202

      #3
      Originally posted by honey99
      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.

      Comment

      • honey99
        New Member
        • Jul 2007
        • 46

        #4
        Originally posted by sumittyagi
        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() ...

        Comment

        • honey99
          New Member
          • Jul 2007
          • 46

          #5
          Originally posted by honey99
          Thank u i'll try it with window.opener() ...
          will anyone tell me the solution for my problem

          Comment

          Working...