Creative Juices Bo. Co.

Satisfy Your Thirst For Something Refreshing!

ColdFusion: Unable to create temporary file

GetTempDirectory Needs To be Added To Your SandBox Security

Over the past few weeks I have been seeing a nice little error message coming from a few of my customers shared hosting sites. It seems to happen whenever I am using CFIMAGE to read or resize an image. I did a little digging on Google and came across a nice thread discussing the problem. I'm posting it here so I have easy access to it, but you might find a need for it as well.

http://forums.adobe.com/message/3060530
http://www.cfexecute.com/post/coldfusion-verity-unable-to-create-temporary-file

"If you are using Sandbox Security you'll need to add the value of the GetTempDirectory function to your Sandbox with read and write permissions and it will start working again."

I'll keep you updated on the response from the ISP.

read full article...

CSS3 Webfonts

This post is primarily a reminder for myself, but it might be useful for others as well. One of the cool new features of CCS3 is the ability to use customer fonts by declaring @font-face. I've been using some of the cool @Font-Face Kits from Font Squirrel on some of my new sites. One of the things I just discovered is that some of there included .eot files do not seem to work as expected on Internet Explorer (.eot fonts are what IE is supposed to use).

Anyway, I fixed the problem, by converting the included TrueType (.ttf) file into an .eot font using the ttf2eot service and everything seems to be working correctly now.

read full article...

A Great HTML5 Website Template Called Boilerplate

A Rock-Solid Default for HTML5 Awesomeness

If you're looking for some examples of website development "best" practices, then look no further the the HTML5 Bolierplate by Paul Irish (As well as a slew of other contributors). The site says that this thing is "badass" and I couldn't agree more. I personally have been using a slightly modified version (Made it ColdFusion compatible) of this for the past few websites I've created and a few older sites that I converted. I'm quite impressed.

Why am I impressed? Well, for starters, Google Analytics is showing that the traffic on the sites that I converted jumped 500%. This is essentially telling me I had some problems with the way I was structuring my sites.

One of the really cool features of this collection, is that it includes something called an Ant Build script. I'm still not 100% everything this thing does, but in a nutshell, it optimizes everything in your site. It will minimize JavaScript, CSS, HTML and reduce the size of JPGS, PNG's. Very cool indeed. To use, all you have to do is open terminal (I know, but it's not that hard) and then CD to the build directory (located inside the bolierplate framework) and type ant build. Then sit back while it does its thing.

Don't just take my word for it, check it out yourself and see the awesomeness.

read full article...

U.S. Currency Conversion Using Javascript

A Small JavaScript U.S. Dollar Formatter

If you're like me and work on a lot of e-commerce sites, I'm sure you have come across the need to have a simple function to convert a number to a U.S. Dollar formatted string. If you have scoured Google looking for something, I'm sure you've come across the plethora of "currency" formatting libraries/functions out there. The problem is (at least with me) is that all these functions seem to be large, complicated, monstorous libraries that give you the ability to convert a number into a gazillion different localized currencies. That's fine and dandy if your customer plans on going global, but what if they just want to sell things in the U.S.? That pretty much sums up the majority of my customers.

I've come up with a very simple JavaScript prototype that will convert a number into a nice U.S. Dollar formated string. This function will add the thousands seprator (comma), add the dollar sign ($), add two decimal places and handle negative numbers.

read full article...

Easily Detect iPad, iPhone or iPod Using Javascript

An Simple Way Of Device Detection

I'm currently working on a website and one of the jQuery plug-ins I'm using is really just for eye candy and it only works with mouse overs (or mouse hover events). The problem is mouse over events don't work on the multitude of "touch" devices out there. I needed a quick little script to determine the device in order to stop this plug-in from activating, but also needed an easy way to add other devices down the line (like Android) when needed. Here's what I came up with...

// detect touch devices to turn off any mouseover only functions
window.is_touch_device = (/iPhone|iPod|iPad/i).test(navigator.userAgent);

We are using a regular expression (ignoring case) to determine if our product name is located in the navigator user agent string. If it is, then we set our touch variable to true. This method should be compatible with all major browsers (old and new)

I'm not 100% sure if I like using the userAgent to detect the device, but I couldn't think of an easier way of doing this. If you have some thoughts let me know.

read full article...
Page: 12345678910111213>21