Solved

output query - alternating table cells

Posted on 2003-12-10
6
163 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
  • 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now