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…
Firstly, have a look at the basic syntax here: jquery.com/docs/ajax
A couple of things that I stumbled on:
- 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.
- Getting the ID of the element clicked ended up being pretty simple: this.id
- 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:
See it in use here: glenfosslyn.com.au/pages/2006-sale (This is a work in progress – it may or may not be working at the time you visit!)