Saturday, May 28, 2005

Coldfusion Image Display

I am trying to get an image to display from a path in an msaccess column.

<cfquery name="itemResult" datasource="main_line">
SELECT firstName, phoneID, image, width, height
FROM phone_book
ORDER BY firstName

<cfoutput query="itemResult">
<img src="../images/#image#" width="#width#" height="#height#">

Friday, May 27, 2005

Download From Database To Excel

Ever wonder how to export data from a database and have it open in Excel on the users desktop?

Use this code to get you started.

<cfheader name="Expires" value="#Now()#">
<cfcontent type="application/">
<cfquery datasource="investigatorportal" name="getcodedesc">
select * from code_desc

<cfoutput query="getcodedesc">


Thursday, May 26, 2005

How To Get Names of Form Fields

Use this code to loop over a form to get the form field values:

>cfloop list = "#FORM.FieldName#" index = "ThisField"<
The value of FORM.#ThisField# is #Evaluate("FORM." & ThisField)#>br<

Wednesday, May 25, 2005

How To Center Vertically and Horizontally With CSS

For the CSS method, this depends on whether you are facing quirks mode or standards mode.

The following centers a table.

table {margin: auto;}

If you are facing quirks mode in IE, then you must apply text-align: center; on the containing block.

div {
text-align: center; /* For IE Quirks and older IE's */
border: 1px solid black;

table {
margin: auto; /* For all other browsers */
border: 1px solid black;


Tuesday, May 24, 2005

Add A Close Window Link

<a href="javascript:window.close()">Close Window</a>

Monday, May 23, 2005

How To Turn Off The Squares In Dreamweaver

From the main menu select: View > Grid > Show Grid (Untick this option)

Sunday, May 22, 2005

Scroll Bar Color

Is it possible to control the color of the scroll bar?

Yes you can control the color of the scroll bar. See for the code in use.

body {scrollbar-face-color: #022A52; scrollbar-highlight-color:
#3399FF; scrollbar-3dlight-color:
#CCFFFF; scrollbar-darkshadow-color: #000000; scrollbar-track-color:
scrollbar-arrow-color: #FFFFFF;}
// -->