huzefaq
asked on
having problem with table in a jsp
Hi I need a table to look like this
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -
Name / Title Phone / Email
(line)-------------------- ---------- ---------- ---------- ---------- ---------- ---------- ----(line)
Steven-Stern test-ccim , CCIM 312-321-4512
(no line here) Send Email Image(spanned over 6 rows)
Chief Snack Officer
430 N. Michigan Ave.
Suite 800
Chicago, IL 60611
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---
but it comes out to be like this
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---
Steven-Stern test-ccim , CCIM 312-321-4512
(line)
Chief Snack Officer Send Email
430 N. Michigan Ave.
Suite 800
Chicago, IL 60611 ( image over here)
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---
Any help will be greatly appreciated
it also prints lnes between each person 's data. I need a line onle between all the data
here's my code
__________________________ __________ __________ __________ __________ __________ __
<tr>
<td>
<table width="508">
<!-- To get rid of Null values -->
<%!
public String checkNull(String theValue){
return ( theValue == null ) ? "" : theValue;
}
%>
<% if(message != null) { out.println("<br><span class='message_text'>" + message + "</span>"); } %>
<%
if(search_results.size() > 0) { %>
<tr height="25">
<%-- <td bgcolor="#989898" nowrap> <a class="title_link" href="<%=chapter_name%>?ac tion=searc h_members& first_name =<%= first_name %>&last_name=<%= last_name %>&city=<%=city%>&state=<% =state%>&c cim_status =<%=ccim_s tatus%>&or der_by=fir st_name">F irst Name</a> </td>
<td bgcolor="#989898" nowrap> <a class="title_link" href="<%=chapter_name%>?ac tion=searc h_members& member_id= <%= member_id %>&first_name=<%= first_name %>&last_name=
<%= last_name %>&city=<%=city%>&state=<% =state%>&c cim_status =<%=ccim_s tatus%>&or der_by=las t_name">La st Name</a> </td> --%>
<th align = 'left'>Name / Title</th>
<th align = 'left'>Phone / Email</th>
<th></th>
</tr>
<%
String bgcolor = "#F0F0F0";
while(result_iterator.hasN ext()) {
ChapterMember next_record = (ChapterMember)result_iter ator.next( );
%>
<tr>
<td>
<tr>
<td nowrap><a href="<%=chapter_name%>?ac tion=show_ memberDeta il&eid=<%= next_record.getMember_ID() %>"><%=next_record.getFirs t_name()%> <%=next_record.getLast_nam e()%>
<%if(next_record.getMember _class().e quals("DES IGNEE")){% >, CCIM<%}%></a>
</td>
<td><%=next_record.getPhon e1()%></td >
<td></td>
</tr>
<tr>
<td nowrap> <%=next _record.ge tTitle()%> </td>
<td><a href="mailto:<%=next_recor d.getEmail ()%>">Send Email</a></td>
<td></td>
</tr>
<%
if(!checkNull(next_record. getAddress 1()).equal s("")) { %>
<tr><td> <%= next_record.getAddress1()% ></td></tr >
<% } %>
<%
if(!checkNull(next_record. getAddress 2()).equal s("")) { %>
<tr><td> <%= next_record.getAddress2()% ></td></tr >
<% } %>
<%
if(!checkNull(next_record. getCity()) .equals("" )) { %>
<tr><td> <%= next_record.getCity()%>, <%=next_record.getState()% > <%=next_record.getZip()%>< /td></tr>
<% } %>
<%
if(!checkNull(next_record. getCountry ()).equals ("") && !checkNull(next_record.get Country()) .equals("U nited States")) { %>
<tr><td> <%= next_record.getCountry()%> </td></tr>
<% } %>
<tr><td></td><td></td>
<td rowspan ='4'>
<img src ="http://www.ccim.com/services/member/profile/pictures/<%=next_record.getMember _ID()%>.jp g" width="45" height="65">
</td>
</tr>
<tr>
<td bgcolor=<%=bgcolor%> colspan ='4'></td>
</tr>
<%}%>
<%}%>
</table>
</td>
</tr>
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----
--------------------------
Name / Title Phone / Email
(line)--------------------
Steven-Stern test-ccim , CCIM 312-321-4512
(no line here) Send Email Image(spanned over 6 rows)
Chief Snack Officer
430 N. Michigan Ave.
Suite 800
Chicago, IL 60611
--------------------------
but it comes out to be like this
--------------------------
Steven-Stern test-ccim , CCIM 312-321-4512
(line)
Chief Snack Officer Send Email
430 N. Michigan Ave.
Suite 800
Chicago, IL 60611 ( image over here)
--------------------------
Any help will be greatly appreciated
it also prints lnes between each person 's data. I need a line onle between all the data
here's my code
__________________________
<tr>
<td>
<table width="508">
<!-- To get rid of Null values -->
<%!
public String checkNull(String theValue){
return ( theValue == null ) ? "" : theValue;
}
%>
<% if(message != null) { out.println("<br><span class='message_text'>" + message + "</span>"); } %>
<%
if(search_results.size() > 0) { %>
<tr height="25">
<%-- <td bgcolor="#989898" nowrap> <a class="title_link" href="<%=chapter_name%>?ac
<td bgcolor="#989898" nowrap> <a class="title_link" href="<%=chapter_name%>?ac
<%= last_name %>&city=<%=city%>&state=<%
<th align = 'left'>Name / Title</th>
<th align = 'left'>Phone / Email</th>
<th></th>
</tr>
<%
String bgcolor = "#F0F0F0";
while(result_iterator.hasN
ChapterMember next_record = (ChapterMember)result_iter
%>
<tr>
<td>
<tr>
<td nowrap><a href="<%=chapter_name%>?ac
<%if(next_record.getMember
</td>
<td><%=next_record.getPhon
<td></td>
</tr>
<tr>
<td nowrap> <%=next
<td><a href="mailto:<%=next_recor
<td></td>
</tr>
<%
if(!checkNull(next_record.
<tr><td> <%= next_record.getAddress1()%
<% } %>
<%
if(!checkNull(next_record.
<tr><td> <%= next_record.getAddress2()%
<% } %>
<%
if(!checkNull(next_record.
<tr><td> <%= next_record.getCity()%>, <%=next_record.getState()%
<% } %>
<%
if(!checkNull(next_record.
<tr><td> <%= next_record.getCountry()%>
<% } %>
<tr><td></td><td></td>
<td rowspan ='4'>
<img src ="http://www.ccim.com/services/member/profile/pictures/<%=next_record.getMember
</td>
</tr>
<tr>
<td bgcolor=<%=bgcolor%> colspan ='4'></td>
</tr>
<%}%>
<%}%>
</table>
</td>
</tr>
--------------------------
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
https://www.experts-exchange.com/questions/21918855/having-problem-with-table.html
Let me know if what I have suggested is OK