This is a discussion on ColdFusion Tips & Tricks within the ColdFusion Programming forums, part of the Web Development category; When developing ColdFusion applications, it is frequently necessary to display a data report table. It is generally good practice to ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#61
| |||
| |||
| When developing ColdFusion applications, it is frequently necessary to display a data report table. It is generally good practice to alternate the background colour of each row, as the end user will usually find the table easier to read. There are many ways to do this, and they are all perfectly valid. I find, however, that the following method is a neat, quick, and highly flexible method that does not add much complexity to the code. First, we create a class in our stylesheet. This will enable us to change the row colours at any future time with the absolute minimum amount of redevelopment time. Add the following class to your stylesheet: Code: .alt {
background: #E0E0E0;
} Code: <table border="0" align="center">
<cfoutput query="myquery">
<tr<cfif currentrow mod 2> class="alt"</cfif>>
<td>#data1#</td>
<td>#data2#</td>
<td>#data3#</td>
</tr>
</cfoutput>
</table> data1 data2 data3 data1 data2 data3 data1 data2 data3 Why use a ColdFusion/Stylesheet combination? When an effective stylesheet solution is applied to each table in your application, you have a completely scalable display set that can be easily adjusted for multiple applications. This will help reduce development time by increasing the portability of your code. Here is the code for the table above: Code: .report {
background: #F7EAE2;
border: 1px solid #A64810;
}
th {
background: #A03900;
color: #FFFFFF;
font-weight: bold;
}
.alt {
background: #FFFFFF;
} Code: <table border="0" cellpadding="4" cellspacing="0"
align="center" class="report">
<tr>
<th>Header1</th>
<th>Header2</th>
<th>Header3</th>
</tr>
<cfoutput query="myquery">
<tr<cfif currentrow mod 2> class="alt"</cfif>>
<td>#data1#</td>
<td>#data2#</td>
<td>#data3#</td>
</tr>
</cfoutput>
</table> Want to republish this article on your site? This article may be republished on your personal, non-profit, or commercial website, blog or E-Zine free of charge provided there is an active link to Helen M. Overland - Online Marketer & SEMLady and that this copyright notice is included. The article must be publicly and freely available - without a charge for the content. |
|
#62
| |||
| |||
| Access is Restricted to this ColdFusion Service This copy of Allaire ColdFusion is licensed for use by a single user only. The ColdFusion server is currently configured to accept requests exclusively from IP address 127.0.0.1. (Your request was made from xxx.xxx.xx.xx.) The ColdFusion engine must be stopped and restarted to reset the permitted IP address. ------ Ever wonder how the single-user version of Cold Fusion determines which IP address it would work for? This has baffled many programmers (myself included) in trying to figure it out. It doesn't clearly state how it works but a hint is provided in the error message: "The ColdFusion engine must be stopped and restarted to reset the permitted IP address." The single-user version of the Cold Fusion server will only respond to the IP address that sends the first request to it. If you have an application on your computer that you want to demonstrate from another computer, restart the Cold Fusion server. As long as you do not run any templates on your computer, you should be able to execute it fine from any other computer. |
|
#63
| |||
| |||
| Configuring the Development Mappings Click on the Debug menu item and select "Development Mappings". The first time you enter this dialog box, the window with all mapping information should be empty. Select the RDS server you wish to map via the drop-down selection box at the top next to "Cold Fusion Server". If you configured your RDS Server with a description of "Development", then you would select "Development" here. At the bottom of the dialog box, you should see three fields, one each for "Studio Path", "CF Server Path", and "Browser Path". For the Studio Path, enter the physical directory on your computer that you use to edit your templates. This could be "N:\Internet\WWW" or "\\Webserver\Internet\WWW". Now for the CF Server Path. This is the path to the same directory entered for the Studio Path except that it is the physical path on the webserver itself. For example, it could be "D:\Internet\WWW". For the Browser Path, enter in the URL you use in your web browser to view your website. For example, enter "www.mysite.com". Once you have entered in all of the information, click on the Add button and then click on the OK button.Atlanta Affordable ecommerce Web Development |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| C# .Net Tips & Tricks | oxygen | C# Programming | 85 | 01-08-2009 12:25 AM |
| SAP Tips & Tricks | leoraja8 | Operating Systems | 0 | 03-29-2008 12:11 AM |
| PHP Tips and Tricks | Sabari | PHP Programming | 20 | 12-18-2007 05:26 AM |
| .NET tricks & Tips | Karpagarajan | VB.NET Programming | 1 | 04-23-2007 08:17 AM |
| SEO Tips & Tricks | spid4r | Search Engine Optimization | 0 | 03-08-2007 11:03 PM |
Our Partners |