hi,
im having this problem when i send info from my modifyAdministrator.jsp page to the confirmModifiedInfo.jsp page. the info is stored in beans.
the text boxes are populated with info from a database. the user can then change the info.
im performing checks in the confirm page to see if the info being sent has null values or is an empty string after being trimmed.
my problem occurs when the user deletes the info in the text box. if this is all they do the data originally contained in the text box remains the same when it is sent to the confirm page, it doesnt seem to be changed at all, until the user puts in a space or other text.
i think this is caused because ive given the value of the text box a default value and this will only be changed when its updated rather than deleted.
is there a way around this problem?
here is some of the code:
info being sent
checks done on the info
thanks for the help
im having this problem when i send info from my modifyAdministrator.jsp page to the confirmModifiedInfo.jsp page. the info is stored in beans.
the text boxes are populated with info from a database. the user can then change the info.
im performing checks in the confirm page to see if the info being sent has null values or is an empty string after being trimmed.
my problem occurs when the user deletes the info in the text box. if this is all they do the data originally contained in the text box remains the same when it is sent to the confirm page, it doesnt seem to be changed at all, until the user puts in a space or other text.
i think this is caused because ive given the value of the text box a default value and this will only be changed when its updated rather than deleted.
is there a way around this problem?
here is some of the code:
info being sent
Code:
<TR>
<TD height="27"><DIV align="left">Forename:</DIV></TD>
<TD><INPUT type="text" name="forename" VALUE="<%= modAdmin.getForename() %>" > </TD>
</TR>
checks done on the info
Code:
if ( modAdmin.getForename().trim().equals("") || modAdmin.getForename() == null )
error.setErrorForename(true);
thanks for the help