Shane's ramblings
Discussions of Coldfusion, life, the universe, and everything

Home

September Update

It seems it has been very quiet around here the last few weeks. It has been hectic at work having to make sure everything was prepared for potential hurricanes as well as taking care of some other client projects I have been working on.

I have also been doing a lot of work (ahem, playing) around with jQuery learning AJAX and how to pass data back and forth between jQuery and ColdFusion. I've had a few neat successes and more than my share of flops, but it has been a learning experience and pretty fun at the same time.

Development has stalled on WhosOnCFCDB, but I plan on resuming development on it to get it up to the same functionality in WhosOnCFC 2.2.3. As one user pointed out there is no documentation for it and I plan on getting that remedied up shortly as well. As I noted in a comment about the situation, the docs for WhosOnCFC and WhosOnCFCDB are pretty much the same and I published the current docs up on Google Docs and they can be found here:

http://docs.google.com/Doc?id=dhjwqsht_12c77dd7cn

Using jQuery to Scroll to the bottom of an Element

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") });

jQuery, my new toy

Perhaps I am a bit behind in the times, but after reading over some blog posts I decided it was time to quit procrastinating and finally look over the documentation for jQuery. After reading the docs, viewing the sample applications, and seeing the sample code the only thing going through my mind was "Why the heck didn't I check this out sooner?!?"

In my defense, the name is kinda a misnomer. That is the only excuse I could muster. However, I have decided that 2008 is going to be the year I expand my horizons, so this is in line with my New Year resolutions. I have not yet looked at some of the other javascript libraries, such as prototype, but that is coming.

I will post some of my n00b first impressions later.