Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

null statements

Status
Not open for further replies.

chaddu1256

IS-IT--Management
Jan 13, 2003
28
0
0
US
<%
//to test for null values
String va5 = "";
if (request.getAttribute("meterNo").toString().equals("00000000")){
va5 = " ";
}
else{
va5 = request.getAttribute("meterNo").toString();
}
%>
<td><div align="center" class="sscolor1"><%= va5%>

Right now I have this code here that is checking a table for a Meter Number, when the meter number is 00000000 then it just displays a blank, what I want to be able to do is have this statement check for 000000000 and "null" and display a blank if either is present. Is there a way to rewrite or modify this statement to check for both of these?
 

That looks more like VB to me, than Javascript - you might try the VB forum or ASP forums instead?

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top