Another In-Place Editor, jQuery Plugin

BIG UPDATE: (07-16-2008) ADDED SOME FEAURES! Added a bunch more parameters to customize this. On blur can either save or cancel the editing. Lots of bugs fixed, etc… I also added a BSD licence to it. Download and check out!!!

UPDATE: (12-04-2007) ADDED SOME FEAURES! You can now use the escape key to cancel the action and when you initiate the in-place event, the input field becomes focused.

This is the new home of the ‘Another jQuery In-Place Editor’ that used to reside at http://davehauenstein.com/code/?a=inplace

What is it?

This is a script that turns any element, or an array of elements into an AJAX in place editor using one line of code. It’s written using the jQuery Library, which is available free here.

Examples

Check out this page with examples. It shows a bunch of different ways the script can be implemented and the code examples.

Download

(more…)

Javascript and Associative Arrays

I have good news and bad news for those of you who want to use associative arrays in your Javascript. The bad news is that Javascript doesn’t have built in support for associative arrays the way PHP and other programming languages do, well, at least not in the conventional sense. The good news is that you do have options! Before you stop reading this article because it gave you news you were hoping not to hear, read on to find that there is a very simple and interesting solution, using javascript objects, instead of an actual javascript array. Unfortunately, this doesn’t allow for using javascript array functions such as arrayName.length and/or arrayName.splice.

Moving on, there are a few ways of setting up a javascript associative array: (more…)

Happy Valentine’s Day with a new site!

I guess the best way to start a blog is to write your first entry the day you get your new computer. Nick and I both received the Mac Pro dual 2.66 GHz w/20″ display today that our boss hooked us up with. It’s amazing. The mighty mouse is way better than I thought it would be. It’s almost flawless… so far, anyway. I installed everything i needed in under 3 hours. This included:

  • PHP 5.2.1
  • MySQL 5
  • The entire Adobe CS2 bundle
  • Textmate
  • Cocoa MySQL
  • Transmit
  • The Macromedia suite
  • Safari
  • Thunderbird
  • and a bunch of other random things

I don’t have much to write about today because I’m in a rush to get to my Dinosaurs class and pass the test that I hardly studied for. But i will leave you with some information about the site and it’s future. First of all, I plan on doing a bunch of changes and upgrades to the layout and the CSS. I also plan on adding some photography and stylesheet switching capabilities. I put this thing together in about 2 hours… If I didn’t do it that way, I’d never have a blog. The photo that appears now was taken in Paterson, NJ and you can read more about it and see more photos i took here.