in refresh

i'm trying to update records and when i edit a particular value and click update it gets updated in the database but the changes are not visible in the current screen.instead if i click the update button again i can see the change.can anybody help me in this such that i'll be able to see the changes the first time itself.

here is my code:

i'm getting the values and passing it to a fn called GOEDIT LIKE THIS..

<TD><a href="javascript:goEdit(document.EditViewForm.equipid.value,document.EditViewForm.equipno.value,document.EditViewForm.equipname.value,document.EditViewForm.location.value,document.EditViewForm.Model.value,document.EditViewForm.Capacity.value,document.EditViewForm.Rating.value,document.EditViewForm.Weight.value)"><font face="arial" color="black">Update</font></a></TD>

the function GOEDIT IS AS FOLLOWS:

function goEdit(eqid,eno,ename,loc,mod,cap,rat,wt)

{

document.submitform.DoUpdate.value = 'Y';

document.submitform.equipid.value = eqid;

document.submitform.equipno.value = eno.toUpperCase();

document.submitform.equipname.value = ename.toUpperCase();

document.submitform.location.value = loc.toUpperCase();

document.submitform.Model.value = mod.toUpperCase();

document.submitform.Capacity.value = cap.toUpperCase();

document.submitform.Rating.value = rat.toUpperCase();

document.submitform.Weight.value = wt.toUpperCase();

document.submitform.submit();

}

THEN the form and the update is done as follows:

<%if (request.getParameter("DoUpdate")!=null)

{

tractor.setEquipNo(request.getParameter("equipno"));

tractor.setEquipName(request.getParameter("equipname"));

tractor.setLocation(request.getParameter("location"));

tractor.setModel(request.getParameter("Model"));

tractor.setCapacity(request.getParameter("Capacity"));

tractor.setRating(request.getParameter("Rating"));

tractor.setWeight(request.getParameter("Weight"));

tractor.update();

}%>

<form action="tablevieww.jsp" method="post" name="submitform" id="submitform">

<input type="hidden" name="DoUpdate" value="">

<input type="hidden" name="equipid" value="">

<input type="hidden" name="equipno" value="">

<input type="hidden" name="equipname" value="">

<input type="hidden" name="location" value="">

<input type="hidden" name="Model" value="">

<input type="hidden" name="Capacity" value="">

<input type="hidden" name="Rating" value="">

<input type="hidden" name="Weight" value="">

</FORM>

can anybody help in refresh..

Thanks

[2804 byte] By [greatchivi] at [2007-9-26 1:30:50]
# 1
what about tablevieww.jsp r u getting values from tractor object
sribk at 2007-6-29 1:29:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
actually the above code also resides in tablevieww.jsp and i'm getting the values too.Thanks
greatchivi at 2007-6-29 1:29:30 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...