*********************************************************************************

*** For more ColdFusion applications, tips, etc., go to www.donnafontenot.com ***

*********************************************************************************

This is my collection of snippets (40+) that I use for HomeSite and CF Studio.  Snippets are small chunks of code that can easily be inserted into your template via the Snippets tab in Homesite or CF Studio. I hope some of these are helpful to you. 

Unzip them into your snippets folder in either Homesite or ColdFusion Studio. (Note: Some of these snippets have come from other sites around the web. I don't recall where they may have come from, as I've been collecting them for years.) 

Snippets included are:

50StatesAbbreviated - A select box with the 50 US states listed - abbreviations as the value, abbreviations as the option shown.

50StatesFull - A select box with the 50 US states listed - abbreviations as the value, full state names as the option shown.

AlertBox - Simple javascript alert box

Alternating Row Colors - Example of how to alternate row colors in a table.

AntiCache - cfheader statements to prevent page caching

AreYouSure - javascript function to ask user 'Are you sure you want to delete this?' when clicking on a Delete link.

CFFILE Size Limit - limit the size of files uploaded via the cffile tag

Cursor in Field - place cursor in form field automatically

Date Set - set various dates such as today, tomorrow, etc

DateRange - query select statement to select records between two dates.

DHTML Clock - cool clock

DisableSite - Temporarily turn off site.

DisplayResultsHorizontally - display query results horizontally rather than vertically

Export To Excel - export query to excel format (.csv)

Four Across Table - Display recordset in table with new row starting after every four records.

FrameBuster - bust out of a frame

Get Last Inserted ID - using CreateUUID

IEFavorite - add a 'Bookmark this site' link for IE users.

iFrame - create an iframe

insert - insert query template

Insert Access Date - insert date into access date field

Javascript Link - link to external js file

JS Back Button - create javascript back button

Limit Textarea Chars - limit number of characters entered into textarea

Meta Refresh - simple meta refresh tag

Meta Tags - simple meta tags such as description, keywords, etc.

Page Refresh - automatic page refresh

PopUp Script - popup window

Readonly field - make a form field read only

Remove Link Underline - use css to remove link underline

Robots.txt - sample of robots file

RolloverFormButton - create simple rollover form button

Select All Checkboxes - click button to select all checkboxies (or deselect all checkboxes)

Select Countries - a select box with all countries listed (ok, i have no idea if ALL countries are listed, but a whole bunch are)

SelectAllCheckboxes - another script to select all checkboxes

Session Delete Browser Close - delete sessions when closing browser

Spaces in DB Fieldnames - query select statement to deal with fieldnames that have spaces in them

Stylesheet Link - how to link to external stylesheet

Submit Button to Wait Button - change a submit button to a Wait button when clicked

Supports Cookies - checks to see if user's browser supports cookies

SureYouWantToDelete - Show alert box when user clicks on Delete button to confirm deletion

Two Column Output - Display recordset in table with new row starting after every two records.

Update Query - update query template

URL Antihacker - prevent url exploitation
