ColdFusion Site Timeouts? Check To See If Your Database Server.
Awhile back I had switched one of my clients websites from CrystalTech to HostMySite. The site on CrystalTech was inaccessible at least 2 times a day, due to either a ColdFusion/JRun restart or some other problem. Talking it over with the client, we decided it would be a good time to update their code and move it on over to HostMySite.
Almost immediately, we noticed some speed gains, but again we started to see that the site would go down once a or twice a day. I was starting to wonder if it was my code, but I had been running it internally on my server with no problems at all. My server is about 7 years old with only 1 gig of ram. Surely, if it could run on this junker, it should run fine on our ISP's shared server.
setAttribute("style","YOUR STYLE INFO")
I'm right in the middle of a couple of large projects right now, hence the lack of posts lately, but I wanted to share a little problem I just ran into with everyone.
I like to keep my JavaScript condensed, so I like to use setAttribute for style information. But one of my clients reported a problem with a simple survey window I created recently. Apparently, Internet Explorer (go figure) wasn't playing nice with the script I created.
A Quick Fix for the dreaded Internet Explorer 6.0 (IE6) Unclickable Links
Every once in awhile I create a website and start testing things in IE6 only to find that my navigation or another links is "unclickable". I know I've Googled this about a zillion times, but to be honest I can't remember the exact problem (I think it might be a box-model positioning error or something like that).
Anyway, I was testing a site today and ran into the problem again, so I thought I would share it with you. The fix is fairly simple,
all you need to do is set your CSS position rule to relative in your CSS stylesheet for any links having the problem.
Example CSS
#myNav a { position: relative; }
Pretty simple, huh? So happy coding and let me know if you have any insight into this.
Mango vs. BlogCFC
Awhile back I switched my blog from BlogCFC to Mango Blog. The reason I made the switch was simple. I wanted more control over the layout and BlogCFC seemed overly complicated for this task. I have been patiently waiting for version 6, that Raymond Camden has been hinting at for the past 6 months. (Maybe even a year). This version was supposedly more geared towards using templates. As exciting as this news was, it seemed as the progress was moving slowly. And I had to make a decision on my own blog, hence I made a switch.
I really like some aspects of Mango Blog, especially their plug-in architecture and their administration controls. But at the same time, I miss some of the more robust features the BlogCFC had, like subscriptions, stats, etc. And another key point, was that BlogCFC would never pass the W3C's XHTML Validator. It was laced with errors and warning. Mango on the other hand was perfect in that aspect.
Scaling an Image to Fit or Fill a Destination Box
One of the most requested functions that my customers seem to ask, is that they want to upload their own images to the website. Technically, it's not difficult, especially if your using a server technology like ColdFusion, php, etc, but from a design perspective, it's a big headache. When designing a website, you create "blocks" (for lack of a better term) that are either going to be used for text or images. You might use an image editing programing like Adobe® Photoshop® to scale and crop the images to make sure they load fast and fit into the block's dimensions. Unfortunately, most of our customers do not have these tools and wind up trying to upload an image that are to large and weren't really designed to fit within our designated "block".
We needed to create a function that would take our customers uploaded image and scale it into these blocks. Not knowing what the customer was going to upload, we had to create something that was dynamic enough to adapt to what ever size the final destination image was going to be and also to the source image the user uploads.