Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I remove empty space combo box

843838Jan 3 2006 — edited Jan 4 2006
My promblem is that I have empty space between selected option and the other option Below are code i used to build this combo box .This combo box display list of possible user of the system and selected option show to the currrent user of the system. Code are[
code]
<% sql_query = "SELECT em_num, em_name, dfu_usr_id "+
" FROM dfusrf, emmast "+
" WHERE dfu_emp_id = em_num "+
" ORDER BY em_name ";
try{
rset = db.execSQL(sql_query);
while ( rset.next()){
String em_num2 = rset.getString("em_num");
String em_nme2 = rset.getString("em_name");
%>
<option value="<%= em_num2 %>">
<% if ( em_num2.equals(em_num) ){%>
<option value="<%= em_num2 %>"selected>
<%= em_nme2 %></option>
<%} // end if
%><%= em_nme2 %></option>
<%} // end while
} // end try
catch ( Exception e )
{
System.err.println("Error in query - emmast2 - transaction_main.jsp " e.getMessage() " sql " + sql_query);
}
finally
{
if ( rset != null ) rset.close();
}
%>
</select>
[/code
]
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 1 2006
Added on Jan 3 2006
4 comments
257 views