Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CSS style not displaying on Null values

Posted on 2006-11-14
7
Medium Priority
?
187 Views
Last Modified: 2013-12-24
I am working on this web report for my company using Coldfusion and CSS style sheet.  Whenever a column on the report is displaying a null value the underline on the CSS style sheet doesn't appear.  How do I get the bottom line of the CSS style sheet to appear on NUll values in the report.  Below is my code

<cfoutput query="dsprpt">
      <cfif (#dsprpt.currentrow# mod 2) EQ 0>
        <tr class="tr_evenrow"> <cfelse> <tr>
      </cfif>
      <td class="tdstart"><a href=".../coop/phase2/preapprove/dsp_update.cfm?Preapproval_ID=#Preapproval_ID#" target="_blank">#dsprpt.Preapproval_ID#</a></td>
      <td class="tdstart">#dsprpt.Vendor#</td>
      <td class="tdstart">#dateformat(dsprpt.Date_PreApproval,'MM/DD/YYYY')#</td>
      <td class="tdstart">#dsprpt.Coordinator#</td>      
      <td class="tdstart">#dsprpt.ContactName#</td>      
      <td class="tdstart">#dsprpt.Fax#</td>            
      <td class="tdstart">#dsprpt.Email#</td>                  
      <td class="tdstart">#dollarformat(dsprpt.ExpectedCost)#</td>
      <td class="tdstart">#dsprpt.EntryCode#</td>
      <td class="tdstart">#dsprpt.PricePoint#</td>
      <td class="tdstart">#dsprpt.Status#</td>
      <td class="tdstart">#dsprpt.Notes#</td>
      <td class="tdstart">#dateformat(dsprpt.Date_Received,'MM/DD/YYYY')#</td>
      <td class="tdstart">#dsprpt.ActionUser#</td>      
      <td class="tdstart">#dsprpt.ActionDate#</td>      
</tr>      
      </cfoutput></table>
      </tr></td>
  </table>
      </div>
0
Comment
Question by:rudodoo
[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
  • 3
  • 3
7 Comments
 
LVL 9

Assisted Solution

by:73Spyder
73Spyder earned 1600 total points
ID: 17941134
You might could check for nulls and if so put a space in like this:

 <td class="tdstart">
   <cfif len(dsprpt.Vendor) GT 0>#dsprpt.Vendor#<cfelse>&nbsp;</cfif>
</td>


That way there is something in the output instead of an empty string.
0
 

Author Comment

by:rudodoo
ID: 17941184
Will that effect the table that the insert form uses to insert records into the the database.
0
 

Author Comment

by:rudodoo
ID: 17941218
Also tdclass on the style sheet is defined as


.tdstart {
      padding: 3px 8px;
      text-align:right;
      border-bottom: 1px solid #999999;
}
0
Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

 
LVL 20

Expert Comment

by:trailblazzyr55
ID: 17941225
you don't really need to check against a value, you can just keep it short and do this...

<cfif len(trim(dsprpt.Vendor))>#dsprpt.Vendor#<cfelse>&nbsp;</cfif>
0
 
LVL 20

Accepted Solution

by:
trailblazzyr55 earned 400 total points
ID: 17941253
a <td> will not display unless it has content, this is why your styles didn't show for it, and that is why in the absence of content for a <td> you need to give it at least the space "&nbsp;"

<cfif len(trim(dsprpt.Vendor))>#dsprpt.Vendor#<cfelse>&nbsp;</cfif>
             check for content         if content show        else give it a space for filler
0
 
LVL 20

Expert Comment

by:trailblazzyr55
ID: 17941310
you asked: "Will that effect the table that the insert form uses to insert records into the the database."

if I understand you question correctly then no, the space is just for display purposes and to get the style to display properly in the column in the absence of content returned from the query for that given field.

if you have hidden fields or forms vars dependant on the values returned from your query, it'll just update again with a null when you submit, you don't need spaces there, just for display...
0
 

Author Comment

by:rudodoo
ID: 17941368
That worked great I appreciate it
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

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 …
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

636 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