Solved

output query - alternating table cells

Posted on 2003-12-10
6
171 Views
Last Modified: 2013-12-24
my output query:

<cfoutput query="drs"><tr>
               
            <td width="7%" valign="top"><a href="detail2.cfm?DrID=#drs.DrID#"><img src="../images/doctors/thumbs/#drs.thumb#" alt="Dr.#drs.LastName#" border="0"></a></td>
            <td width="93%" valign="top">
<p><a href="detail2.cfm?DrID=#drs.DrID#">#FirstName# #MI# #LastName# #Type#</a>
<br>#Blurb#</p> </td>
  </tr></cfoutput>

this is the way it looks now:
http://rothmaninstitute.com/ourdoctors/index.cfm

this is how i want it to look:
http://scoi.com/doctors/index.html
0
Comment
Question by:phillystyle123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9914931
<cfoutput query="drs"><tr>
               <cfif drs.currentRow /2>
               <td width="10%"></td>
               </cfif>
            <td width="7%" valign="top"><a href="detail2.cfm?DrID=#drs.DrID#"><img src="../images/doctors/thumbs/#drs.thumb#" alt="Dr.#drs.LastName#" border="0"></a></td>
            <td width="93%" valign="top">
<p><a href="detail2.cfm?DrID=#drs.DrID#">#FirstName# #MI# #LastName# #Type#</a>
<br>#Blurb#</p> </td>
  </tr></cfoutput>
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9914942
and change this

<td width="93%" valign="top">

to this
<td width="83%" valign="top">
0
 

Author Comment

by:phillystyle123
ID: 9915040
almost there! this is what i'm getting using your code:

http://rothmaninstitute.com/ourdoctors/index2.cfm
0
Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

 
LVL 25

Expert Comment

by:James Rodgers
ID: 9915124
<cfoutput query="drs"><tr>
               <cfif drs.currentRow /2>
               <td width="10%"></td>
               </cfif>
            <td width="7%" valign="top"><a href="detail2.cfm?DrID=#drs.DrID#"><img src="../images/doctors/thumbs/#drs.thumb#" alt="Dr.#drs.LastName#" border="0"></a></td>
            <td width="83%" valign="top">
<p><a href="detail2.cfm?DrID=#drs.DrID#">#FirstName# #MI# #LastName# #Type#</a>
<br>#Blurb#</p> </td>
<cfif NOT drs.currentRow /2>
               <td width="10%"></td>
               </cfif>

  </tr></cfoutput>
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9915131
it looks like it is appearing on every row try mod instead of /
0
 
LVL 15

Accepted Solution

by:
danrosenthal earned 75 total points
ID: 9915181
Try this...

<cfoutput query="drs">
      <tr>
            <CFIF currentrow MOD 2 eq 0>
            <td></td>
            </cfif>
            <td valign="top"><a href="detail2.cfm?DrID=#drs.DrID#"><img src="../images/doctors/thumbs/#drs.thumb#" alt="Dr.#drs.LastName#" border="0"></a></td>
            <td valign="top" <CFIF currentrow MOD 2 neq 0>colspan="2"</cfif>><p><a href="detail2.cfm?DrID=#drs.DrID#">#FirstName# #MI# #LastName# #Type#</a><br>#Blurb#</p></td>
      </tr>
</cfoutput>
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question