View Single Post
Old 03-10-2011, 08:50 AM   PM User | #1
maria_megha
New Coder

 
Join Date: Dec 2010
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
maria_megha is an unknown quantity at this point
handling nulls in jsp textbox

Hi how can I replace "null" from being displayed with an empty string in a textbox on the JSPs ..depending on textbox data availability..
I tried the code below but still it displays null

Code:
<% String phone=userInfoObj..getPhoneno();
if(phone==null||phone.equalsIgnoreCase("null"))
phone=" ";
%>
		
		<td >
		<input type="text" name="phoneno" class="txtBox" value="<%=phone %>"></td>
can you suggest by using java or javascript?
maria_megha is offline   Reply With Quote