AHAH! It’s jQuery!

This was going to be a post about my first stab at AJAX. But, as technically it’s AHAH, I thought I’d use the lame title above…

This snippet uses jQuery – an excellent little piece of Javascript that makes this sort of trickery relatively simple.

Firstly, have a look at the basic syntax here: jquery.com/docs/ajax

A couple of things that I stumbled on:

  1. Content loaded via the .load call doesn’t have any event handlers attached, so in the Callback function you need to use .find() to look for any elements you want to assign events to.
  2. Getting the ID of the element clicked ended up being pretty simple: this.id
  3. Getting the value of a form field involves a simple walk around the DOM – as the form isn’t actually “Submitted” – use document.GetElementById(“fieldID”).value

Then you should end up with something more-or-less like this:

Continue reading

Don’t Be Content Without Content

Excellent post over at Blue Flavour bringing attention to the amount of time we spend on content for websites we’re developing.

We’ve all had trouble getting content from clients, but really, what are we doing to help them prepare it? Do we just say, “It’s your problem, sort it out” or do we direct clients to good resources to help them get it together?

Some excellent comments on this post too, including a reference to providing clients with a content brief.

Food for thought…