My First AJAX Experience

Feb

22

All in all, I'd have to say I had a very pleasant experience using AJAX for the first time. The most difficult aspect of working with AJAX, was learning how to implement it. Once I found the right documentation, it was relatively smooth sailing.

Getting Started

First off, you should download an AJAX library. I recommend the Prototype javascript library. What is prototype.js anyway?

Prototype is a JavaScript framework that aims to ease development of dynamic web applications. Featuring a unique, easy-to-use toolkit for class-driven development and the nicest AJAX library around, Prototype is quickly becoming the codebase of choice for web application developers everywhere.

Basically, a guy named Sam Stephenson spent, I'm sure, an inordinate amount of time writing this great javascript file in order to make life easier on all of us. Using this file makes writing your AJAX code much easier. As mentioned earlier, the hardest part about getting started was finding documentation. So, in order to make it simpler for you, I'm going to include links to the documentation that I used to get started.

  • Developer Notes for prototype.js - This documentation was exactly what I needed, and could quite possibly be the only thing you'll need. It contains some really great examples in the beginning of the document, and the contains more detailed information later on. After reading the first few paragraphs, I was able to get started, and then used the rest of the document for reference (this part of the document conveniently happens to be named "Reference for Prototype.js") haha.
  • Working With Events In Prototype - How to use prototype with Keystrokes, Mouse Clicks, Mouse Hovers, etc.
  • Eas y Ajax with Prototype

Read the rest of this entry »

Site Breakdown: Part I – Header

Jan

27

I spent a considerable amount of my free time on this site, and enjoyed every single second of it. Perhaps a little too much (ask my wife). Since I've spent so much time, and have learned a ton while doing so, I feel that it's only right, as a designer who utilized information from other blogs to create this one, to give a relatively detailed breakdown of this site. Since this will be somewhat detailed, I've decided to break it down into parts:

  • Part I - Header
  • Part II - Body
  • Part III - Sidebar
  • Part IV - Footer
  • (links to the above list will be added as the entries are written)

Read the rest of this entry »

feedtag thisdigg this

Zebra Striping Tables in ColdFusion, using CSS and JavaScript

Nov

05

Striped TableWant to create a table that contains rows of alternating color? This is a little tutorial dedicated to showing you how. I've also added a third color to the mix. This will be used as a highlighting tool when the user mouses over a row. Let's start by having a look at the XHTML and ColdFusion code.
XHTML and ColdFusion:

<table>
<cfoutput query="EmployeeList">
<cfset rowid = "#EmployeeList.EmployeeID#">
  <tr class="#IIF(CurrentRow MOD 2, DE('dark'), DE('light'))#" id="#rowid#" onmouseover="changeBgcolor('#rowid#','rollovercolor');" onmouseout="changeBgcolor('#rowid#','#IIF(CurrentRow MOD 2, DE('dark'), DE('light'))#');">
    <td>
    ...
    </td>
  </tr>
</cfoutput>
</table>

Since the main idea here is to alternate the colors between rows, the key set of code from the above example is the following: currentrow MOD 2. What in the heck does this mean?

ColdFusion offers a modulus function (MOD) that returns the remainder (modulus) after a number is divided by a divisor; for example,10 MOD 3 is 1. -- livedocs.macromedia.com

Since even numbers divided by the number 2 will divide evenly (i.e. no remainder), and odd numbers when divided by 2 will not, we use CurrentRow MOD 2.

The CurrentRow variable is one of a few variables that ColdFusion automatically exposes that provide information about the query. These variables are often called query variables. -- livedocs.macromedia.com

Read the rest of this entry »

Tricklin On...