Hi,
I am feeling it is very simple but I not able to do it.
My problem is I have to show one alert box once the data has successfully stored in to the database
I am setting the saving status in the action class below like this.
try{
relationship.save();
statusOfEditContract="true";
request.setAttribute("statusOfEditContract",statusOfEditContract);
} catch(Exception e){
statusOfEditContract="false";
request.setAttribute("statusOfEditContract",statusOfEditContract);
}
return mapping.findForward("showPhases");
}
The request object I am getting in Jsp below like this
<html:form>
<!-- some code is there - ->
</html:form>
<body onLoad="saveContract()">
<%
if (request.getAttribute("statusOfEditContract").equals("true"))
{
%>
<script language="javascript">
function saveContract(){
alert("Your Commitment Request has been Submitted");
}
</script>
<%
}
%>
</body>
When I run this code I am able to see the alert box once data is successfully stored but I am seeing one small error at the status bar. Value is null or not object.
Please help me on this
Regards
Naren
_________________ Cnu
|