Monthly Archives: November 2009

Colorbox and jQuery form plugin for attractive interfaces

Lately it seems like it is becoming harder to program an effective user interface without the use of javascript.  I for one must admit I have drank the jQuery kool-aide.  I was working on a site for a client and needed a way for the users to change their password.  The site in question also makes extensive use of the Colorbox jQuery plugin and I know that Colorbox can display inline HTML so I thought this would be a good chance to check it out.  It will be aesthetically pleasing and it would be one less page I would have to write, I could just add the code to my current member page.

Read the rest of this entry


Dynamic search filtering with jQuery

Today I was working on a project for a client and they wanted a way to easily search through their 400 or so users.  I wanted a way to do it dynamically (ala project search on RIAForge) so I whipped up a quick little script that does just that.  Using jQuery made is surprisingly easy, but I figured I would share.

Read the rest of this entry

Happy Thanksgiving!

I would just like to take a moment and wish everyone a happy Thanksgiving and I hope you all  have a wonderful and safe holiday.  Much like the elevator business, my life has had its ups and downs this year, but I still have much to be thankful for.  I have gained quite a few clients this year, both me and my family have been healthy, and I have some great friends I would not trade for the world.  I do not know what more I could ask for.

If you are on the other side of the pond, I hope you still have a happy and safe day, too. 🙂

Railo and Tomcat made easy

I have seen several posts recently about installing Railo for local development, so I figured I would point out a nicely pre-configured Railo/Tomcat package out there from the folks at Vivio Technologies, which can be found here:  They have packages for both Windows and Linux, so you should have your bases (and operating systems) covered.   One other benefit of using the package is no web server is required.  Tomcat will act as its own web server.

It is very easy to install new webs using the package, the only thing required is editing your Tomcat server.xml file and add a new entry into the virtual hosts section.  A typical entry will look like this:

<Host name="site1.localhost" appBase="webapps">      
    <Context path="" docBase="C:\Sites\site1.localhost" />

After you have made the appropriate changes to your HOSTS file and restart Tomcat you will be in business.

Getting to know Transfer ORM

I realize this post comes at an awkward time.  It seems most of the posts about ORMs nowadays all center around Hibernate after the release of ColdFusion 9.  However, if like me, you are using some of the open-sourced CFML engine alternatives like Railo or OpenBD, Hibernate support might be on the project road map but it is not here yet.  I still have quite a few sites out there running Transfer ORM, so I for one will be supporting it as long as it is available.

Read the rest of this entry

Example: Animating scroll with jQuery

A reader asked for an example of using the jQuery scroll code I had written a while back.  Based on that code, here is the example:

<div id="myDiv" style="width: 500px; height: 100px; overflow: auto; border: 1px solid black;"></div>
  <input type="text" id="myTextInput" />
  <input type="button" value="Send" id="postButton" />
<script type="text/javascript">
      $('#myDiv').append($('#myTextInput').val() + '<br/>');
      $("#myDiv").animate({ scrollTop: $("#myDiv").attr("scrollHeight") }, 1000);

A simple, functional example.

Check out the demo:

Edit 3/10/10:
Please see the new post here:

Install Ubuntu on Dell XPS 400 and Dell E196FP Display

I received an email from Michael and he was having some issues installing Ubuntu on a Dell XPS 400. I wrote entries on this when I was first getting heavily into Linux that were far more complicated than they needed to be. He was having problems following those posts so I came up with a simplified version.

Here is what I suggest:

Boot Ubuntu [9.04], on the first screen choose your language [English] Then press F4 and select [Safe Graphics]

Then press [F6], but do not select any option. Instead press [Escape] and it will allow you to change the command line. Remove the option “quiet splash –” and replace it with “vga=791” instead

Start the installation

This should install Ubuntu in safe graphics mode at a resolution of 1024×768. Once the installation is finished you should be able to enable the nVidia driver and get the better resolution and color depth.

This should also work for anyone with a nVidia chipset that does not correctly get identified at installation.

Automatically start ColdFusion at boot on Ubuntu Linux (but not 8.04)

Quite a few months ago I did a blog post about starting ColdFusion on boot with Ubuntu Linux. When I originally wrote the post I did put a disclaimer on there that I was indeed new to Linux and there was probably a better way to do what I was attempting to do. I was right.

There is a very easy way to accomplish this in three steps and it does not require editing your system files or going through all the run levels and trying to figure out where to start and stop ColdFusion.

The first thing you need to do is make sure the chkconfig utility is installed on your system. I do not believe it is installed by default on Ubuntu distributions, but that is easy enough to remedy:

sudo apt-get install chkconfig

Next we need to copy our generated coldfusion script to /etc/init.d:

sudo cp /opt/coldfusionX/bin/coldfusion /etc/init.d

At the top of the file ColdFusion made for us are some special directives for the chkconfig utility. Chkconfig will look for these and automatically set where ColdFusion needs to be stopped and started. It looks something like this:


# chkconfig: 345 90 14
# description: starts the ColdFusion MX server

Finally, run the chkconfig utility to add ColdFusion service to the list of services run at boot:

sudo chkconfig --add coldfusion


I was later informed that these instructions do not work on Ubuntu 8.04.  A user found a way around the issue:

Found it and it works!

Create a link to coldfusion in the init.d folder:

sudo ln -s /opt/coldfusion8/bin/coldfusion /etc/init.d/coldfusion

Run update-rc.d:

sudo update-rc.d coldfusion defaults

Easy-Peasy! Even if I have no idea what running update-rc.d actually does…

Using jQuery to scroll to the bottom of a DIV

I have been working on a little AJAX application using jQuery and ColdFusion using JSON to communicate with the page through components. One of the first things I needed to do was to maximize scroll position of a DIV element each time it was updated. Digging around I finally found what I was looking for.

For my benefit, and for anyone else who needs it, assuming you have a div on the page like so:

<div id="myDiv" style="width: 500px; height: 300px; overflow: auto;"></div>

Using jQuery, each time it is updated we could fix the scroll position:

$("#myDiv").attr({ scrollTop: $("#myDiv").attr("scrollHeight") });

And if you would prefer an animated transition, ljpw suggests using:

$("#myDiv").animate({ scrollTop: $("#myDiv").attr("scrollHeight") }, 3000);

You can see a demo here:

EDIT: Post has been revised

Edit 2: jQuery 1.6+ notes
Wilson pointed out in the blog comments that the script should be modified for newer versions of jQuery:

The .attr() must be replaced with .prop() as of jquery 1.6

A long time coming….

I have been using BlogCFC to host my blog since, well, since I began blogging.  As far as a blogging platform goes, I am extremely happy with it.  Unfortunately, I just do not have the time available to keep it updated.  Recently, I have moved hosts and I have encountered some issues that my current time restraints just will not allow me to remedy.

That being said, it will give me a bit of time to get my domain rebuilt.  It has needed a face life for quite some time as well.

I will move some of my more popular blog posts over, it might take a while but I think I can move both of them.  🙂