Goodby CFUnited, Perhaps next year

I have planned unsuccessfully to get to CFUnited. But the for last 6+ years, other obligations have interfered for that week..... So, I get my oxes out of the ditch (which included a funeral, a few surgeries to repair cycling injuries, mom-in-law getting 2 hip replacements...you get the picture) to clear July-August 2011 to attend Next Year -- 2011...

(sigh) My friend Gene Godsey broke that news to me, no next year.... (sigh).

So Here's My VOTE: Have it somewhere, somehow, someway and Honey House Web Designs WILL be there! PLease, please (please)....

DW CS3 Bug? Checking Out Files to Open Externally Can Crash DW

If you are working in a website that is set up to use Contribute for its users, do not try to checkout a file AND open externally at the same time. DW will crash.

I use Topstyle for CSS edits, and I have DW set up to open edit CSS files externally. I often open css files in DW that then open the Topstyle editor. If the CSS file is locked and needs to be checked out of the server, then opening to edit in Topstyle will cause DW to bomb.

Solution: Check CSS file out first, then open/edit. Then all works good.

Note on 'bug': This occurs in Topstyle versions 3.12 and 3.5 (newest version) and in of the latest CS3 DW version. It also occured in CS4, but that was beta. (don't have CS4 production yet... waiting on bit end-of-year bonus -- ha ha ).

Using CSS to Populate a Dynamic Map

Clients often want maps of their service area, particularly county maps of a state, or states/regions within country. I had a project with a land company that wanted to be able to have a map automatically turn on/off a county based on the contents of the property's county in database.

I decided to create a page that used a vector based map with the counties outlined, id each county with a CSS class of that county name, then if any county was retrieved from the query, that county's ID would be highlighted to display. No, the map doesn't need to be a vector map per se, but using CSS can you can extend the functionality of each unit of the map (and resize easily if need be).

An example of this can be found at http://www.atlanticcoast-properties.com/html/scmap.cfm

Since the potential for several states exsists, I created a CSS file for South Carolina, 'sc.css'.

The CSS for the map contains a div tag for the overall map, and a div for the location of each county to display:

#scmap {
height: 506px;
width: 638px;
background-image: url(map/scmap.gif);
background-repeat: no-repeat;
padding: 0;
margin: 0;
position: relative;
font: Arial;
font-size: 11px;
font-stretch: narrower;}    
    
#scmap li {
margin: 0; padding: 0; list-style: none;
position: absolute; text-align: center;}    

#scmap li a:link, #scmap li a:visited, #scmap li a:active
{ color: black; }

#scmap li a:hover {background-color: #BF9839;color: #000;    
text-decoration: underline; }

#none {left: 540px; top: 470px; }    
#spartanburg {left: 145px;top: 41px; }
#greenville { left: 103px;    top: 14px;     }
#oconee {left: 12px; top: 70px; }
#laurens {left: 153px; top: 110px; }
#aiken {left: 207px;    top: 260px;}
#abbeville {left:90px; top: 152px; }
#edgefield {left: 164px;top: 224px;}
#cherokee {left: 202px; top: 9px; }
#union {left: 209px; top: 77px; }
#pickens { left: 65px; top: 44px; }
#anderson {left: 69px; top: 105px;}
#mccormick {left: 95px; top: 202px;}
#chester {left: 269px; top: 76px; }
#york {left: 269px; top: 34px; }
#lancaster {left: 332px; top: 80px; }
#fairfield {left: 276px; top: 127px; }
/*(and so on... not all counties are displayed here )*/

.disabled {color: #999999;}

Then in the .cfm file, I set up the code to use an unordered list display or grey out the counties as needed:

<ul id="scmap">
<cfoutput query="getcounties">

<cfif cnt gt 0 > <!--- cnt is a count of properties from query --->
<li id='#lcase(county)#'> <!--- div id --->
<!--- if county has a count gt 0, diplay link & count--->
<a href='filename.cfm?cid=#countyid#'>#county#</a><br/>
#cnt# listings
</li>

<cfelse> <!--- county has 0 listings at all, show county in proper location but disabled --->

<li id='#lcase(county)#'>
<span class="disabled">#county#</span>
</li>        
</cfif>


</cfoutput>
</ul>

The overall effect takes a bit of time to set up the location of the counties, but once done, it allows your map to disable or show links based on database values without having to recode the map.

This effect can be applied to geographic maps, real estate siteplans, and many other applications that use an overall large mapping but the need to be dynamic in the content for that map.

I can take this effort one more step to create hotspots based on the vector shape of the county and make rollovers, or even color the entire county based on the query results.

"Button" tag vs. input type='button'

Although the tag has been around W3C for a while, Dreamweaver still creates buttons as "form buttons".


<input type="submit" name="button" id="button" value="Click Me">

The form input button creates generic browser buttons, and can be customized using css. However, an easier way to manage the styling of buttons on your site is to use the "button" tag.


<button type="button">Click Me!</button>

This allows a developer to create and use push buttons outside of FORMS in a manner that is better suited for site styling and flexibility.

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.002. Contact HHWD