ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old November 17th, 2004, 11:24 AM
charmed0rz charmed0rz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 142 charmed0rz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 49 m 31 sec
Reputation Power: 4
Cftable

Two questions about this table... i copied it from a book


<cfquery name="cash" datasource="userlogin">
SELECT * FROM Market
ORDER BY Selling
</cfquery>
<cftable query="cash" colheaders HTMLTABLE border="1">
<cfcol header="selling" width="10" text="#selling#">
<cfcol header="quantity" width="5" text="#quantity#">
<cfcol header="total" width="10" text="#total#">
<cfcol header="description" width="50" text="#description#">
<cfcol header="Purchase" width="5" text=<a href="dfgd.cfm">"Buy!"</a>
</cftable>




First off - the headers selling, quantity, total, description, and purchase don't show up. I can highlight it and see it so i know it is there.. My background is black, but the rest of the text on the page in the table show up.. the ones that are populated from database... how can i make those show up?

And next - how can i make a link in the last column? I was just quessing and it didn't work :P

Attribute validation error for tag CFCOL.
The tag does not allow the attribute(s) HREF. The valid attribute(s) are ALIGN,HEADER,TEXT,WIDTH.

Reply With Quote
  #2  
Old November 17th, 2004, 11:41 AM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,488 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 18 h 10 m 11 sec
Reputation Power: 42
I've been doing CF for 7 years and I've never used the cftable tag. My advice would be to simply output the table yourself, you'll have far more control over what happens.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #3  
Old November 17th, 2004, 11:59 AM
charmed0rz charmed0rz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 142 charmed0rz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 49 m 31 sec
Reputation Power: 4
Quote:
Originally Posted by kiteless
I've been doing CF for 7 years and I've never used the cftable tag. My advice would be to simply output the table yourself, you'll have far more control over what happens.


Do you mean a HTML table or just not using table format at all?

Reply With Quote
  #4  
Old November 17th, 2004, 12:04 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,488 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 18 h 10 m 11 sec
Reputation Power: 42
Yes I mean just output an HTML table yourself, and loop over the query to output each row.

<table>
<tr><th>Selling</th><th>Quantity</th>...</tr>
<cfoutput query="cash">
<tr><td>#cash.selling#</td><td>#cash.quantity#</td>...</tr>
</cfoutput>
</table>

Obviously, fill it in with your other columns as needed. Also, all this sort of thing is covered in excellent detail in the Ben Forta book, I'd recommend picking it up as it is invaluable in learning CF.

Reply With Quote
  #5  
Old November 17th, 2004, 02:17 PM
charmed0rz charmed0rz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 142 charmed0rz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 49 m 31 sec
Reputation Power: 4
Quote:
Originally Posted by kiteless
Yes I mean just output an HTML table yourself, and loop over the query to output each row.

<table>
<tr><th>Selling</th><th>Quantity</th>...</tr>
<cfoutput query="cash">
<tr><td>#cash.selling#</td><td>#cash.quantity#</td>...</tr>
</cfoutput>
</table>

Obviously, fill it in with your other columns as needed. Also, all this sort of thing is covered in excellent detail in the Ben Forta book, I'd recommend picking it up as it is invaluable in learning CF.


Ok I am trying an example off a site and it's still doing the same thing with the headers..

<TABLE border="1"
summary="This table gives some statistics about fruit
flies: average height and weight, and percentage
with red eyes (for both males and females).">
<CAPTION><EM>A test table with merged cells</EM></CAPTION>
<TR><TH rowspan="2"><TH colspan="2">Average
<TH rowspan="2">Red<BR>eyes
<TR><TH>height<TH>weight
<TR><TH>Males<TD>1.9<TD>0.003<TD>40%
<TR><TH>Females<TD>1.7<TD>0.002<TD>43%
</TABLE>

Reply With Quote
  #6  
Old November 17th, 2004, 02:27 PM
charmed0rz charmed0rz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 142 charmed0rz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 49 m 31 sec
Reputation Power: 4
Can you put a link in a cf table? if so what am i doing wrong

Reply With Quote
  #7  
Old November 17th, 2004, 03:13 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,488 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 18 h 10 m 11 sec
Reputation Power: 42
If the headers aren't showing up then you've probably got issues with your style sheet or browser. Headers DO show up just fine if they are done correctly.

If you mean is it possible to put a link in a <cftable> tagset, I have no idea since I never use (I actually hate) <cftable>. If you mean can you put a link into a table that CF generates, the answer is absolutely yes.

Reply With Quote
  #8  
Old November 17th, 2004, 03:14 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,488 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 18 h 10 m 11 sec
Reputation Power: 42
Also remember you don't *have* to use <th> for the headers, you can also just output a standard row with <tr><td>My Header</td></tr>.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Cftable


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway