please help me
I am generating an error message when the user enters an tnransmitter ID which is already assigned. The problem is when I reload this page the message still display on the page. But I want clear this error message when the page reload. Can somebody help me to clear this message.
Here is my modified code.
<%
XMLTagBean dup9450tag = new XMLTagBean();
String msg = "This TXID is assigned";
boolean isdup9450tag = false;
String testTx9450Value = "";
for ( int i = 0; i < testTxs.length; ++i )
{
if ( true == DeviceIDRange.t9450.equals( testTxs[i].type ) )
{
testTx9450Value = testTxs[i].txId;
System.out.println("The value of testTx9450Value1 is: " + testTx9450Value + "\n\n");
isdup9450tag = dup9450tag.isAssigned9450Tag( testTx9450Value );
System.out.println("The value of isdup9450tag is: " + isdup9450tag + "\n\n");
if ( true == isdup9450tag )
{
testTx9450Value = "";
System.out.println("The value of testTx9450Value2 is: " + testTx9450Value + "\n\n");
}
//testTx9450Value = "";
System.out.println("The value of testTx9450Value3 is: " + testTx9450Value + "\n\n");
}
else
if ( true == DeviceIDRange.tinov.equals( testTxs[i].type ) )
testTxInovValue = testTxs[i].txId;
}
%>
<%
if ( testTx9450Value.equals("") )
{
%>
<tr><td> </td></tr>
<tr>
<!-- The error text -->
<td>
<span class="error"><%=msg%></span>
</td>
</tr>
<%
//session.removeAttribute( "txid9450.setting.failure" );
}
%>
<% if ( true == is9450 ) {
if( false == isdup9450tag ) {
%>
<tr>
<td width="100px" align="center" class="input-style-4">
<input type="text" name="<%="testTx"+DeviceIDRange.t9450%>" class="input-style-3" value="<%=testTx9450Value%>" size="5" maxlength="5" onChange="testTxCheck( this );">
</td>
<td class="input-style-4">9450</td>
</tr>
<% } else {
%>
<tr>
<td width="100px" align="center" class="input-style-4">
<input type="text" name="<%="testTx"+DeviceIDRange.t9450%>" class="input-style-3" value="" size="5">
</td>
<td class="input-style-4">9450</td>
</tr>
<% }} else { %>
<input type="hidden" name="<%="testTx"+DeviceIDRange.t9450%>" value="">
<% } %>