page should not be refreshed


Web tier: servlets, JSP, Web frameworks: page should not be refreshed

  1. page should not be refreshed (6 messages)

    help needed
    i have a jsp page which has four textboxes and a combo box .the user inputs in three text boxes and when he selects the combo a value from the database corresponding to the combo selection should be displayed in the fourth text box .but the page should not be refreshed to paint the page with the text box value only the value should be inserted into the fourth text box.

    it should not be stored in an array earlier and taken from that array.

    response needed urgently

    Threaded Messages (6)

  2. page should not be refreshed[ Go to top ]

    firstly store the 3 text box values in some session variables and then get the value corresponding to the combo box selection from the database and throw the same page. this time pick the 3 values of text boxes from the session and also the 4 th value from the result of the database query...
  3. page should not be refreshed[ Go to top ]

    hello amol,

    you are saying the data of these three textboxes in session variables and chossen value in somevariable and make database connection to retreive the corresponding value for this somevariable and store in also in other session variable and use either sendredirect or jsp forward .now when the page is downloaded to display these session variables in appropriate text boxes in body onload function.

    i thought of this , if not please reply ....

    with regards
    (kalavendi at yahoo dot com)
  4. page should not be refreshed[ Go to top ]

    i think u r on the right track ram´krishna....
  5. page should not be refreshed[ Go to top ]


    Here are my thoughts to solve this problem.

    1. Use one hidden frame.
    2. Write onChange("javascript:callDB()") event for the combo box and call a javascript funtion say callDB().
    3. In the javascript function callDB() write code to submit the form with form's action="DB JSP" and form's target="the hidden frame name"
    4. Now the "DB JSP" should connect to the database and send the result data(for text field 4) in a hidden form field. It should also generate a javascript function(this should be called on page load) which will modify the value of the text field 4 using javascript code parent.document.form.textfiled4. (some thing like this to refer to the text filed). Now change the value of this field from the hidden frame.

    I think the solution looks difficult to understand. Try to understand the concept. I am trying to give you some hints rather than the full code to implement this.

  6. page should not be refreshed[ Go to top ]

    I am not aware of the hidden frame concept can u pls explain in detail.
  7. page should not be refreshed[ Go to top ]


    Hidden frame is like a frame which is not used for displaying any content in the browser. But can be used for other purposes.

    we create a hidden frame something like this.

    <FRAME SRC="hiddenContent.html" MARGINHEIGHT="0" MARGINWIDTH="0" border="0" SCROLLING="no" NAME="header" NORESIZE>

    Need any further details?

    Ravi Sankar Pabbati
    GE India