-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Error in JavaScript
PostPosted: Fri Jun 22, 2007 12:52 pm 
Newbie

Joined: Mon May 28, 2007 10:53 am
Posts: 4
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.