iam inserting the emp details to TABLE, values are updating to ATABLE but iam not getting updated values in view (java sript in jsp file) please suggest me how to solve this problem

Are you sure that the values are updated to the table. Do you query it and see them updated?
You cannot use javascript to run java code and update the table. Javascript has nothing to do with the java we run here.

If the values are updated, reload the page.

Post code at the JSP forum.

yes, query is updating the values into the TABLE
in java script i wrote like this:


<% if(request.getParameter(

yes, query is updating the values into the TABLE
in java script i wrote like this:

<% if(request.getParameter("emplUpdate") != null && errStr.equals("")) {%>

            alert("<bean:message key='siteadmin.errlbl.EmpEntSuccess'/>");   

            //reload the search frame
            window.parent.frames("fraSearch").window.location.reload();
            window.parent.document.all.selEmp.value = "";
        <% } %>

But while clicking the hyper link the updated value is not showing in the view
By using then same hyper link iam added the new values, the values has been updating in the DB but in view iam getting updated values, it's showing previously values

From what I understand, the fraSearch is the frame where you have the code tha displays, and when you click the link, you put the emplUpdate in the request and determine if the javascript code will execute or not?

Well for that javascript to execute, you need to have it in a <script></script>
The java code executes and creates the javascript code you wrote. But that doesn't mean that the javascript will execute. It must be in the body and in the script tag.

I am not very familiar with frames so I wouldn't advice you use them.
Usually when you update the database and load the page again, you can read the database and display.
After seeing your code it depends where the code that updates is and then how you execute the page where you have the window.parent.frames("fraSearch").window.location.reload(); Can you post more code that shows how you update, how you display, where those happen and in general your jsps structure?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.