Dear all,
In my
jsp page, I am using javascript function.The function is written in between
<HEAD> and
/<HEAD> in the document. I use only one form in the jsp page. I use a condition for calling a
struts action class whenever a variable
bCheck becomes true. I want to validate
date fields in the
execute method of the action class. In the
execute method, I am setting a variable(
newView) in the
request scope.My aim is to open a new window with a specified url, if the validation is true. The strange behaviour, i noticed is mentioned below.
I printed the variable correctly which i set in the execute method before returning back to the
same jsp form from the execute method.
Assume I entered values in the form 3 times(for
testing) and clicked for validation. During the second time, i found that variable
showNewView is getting the value that was set in the previuos time in the
execute method. For example, assume the
date format entered is correct for the first two times and wrong for the third time. I should get the variable
showNewView as true for the first two times
and false for the third time. Instead of that, first time, alert window showed " showNewView value is null" . second time it showed " showNewView value is true" and in the the third time, it showed the previous value. That is " showNewView value is true"
what is the reason for this?
[ January 10, 2007: Message edited by: Bear Bibeault ]