I discovered this super useful jQuery function recently when I was working on a project, you run this on a form and it converts the form elements into a query string representing the state of the various elements, a simple method for creating a query string to be used with AJAX updates:
$(function() {
var loadUrl = "page.php";
function showValues() {
var str = $("form").serialize();
$("#updatethiselement").load(loadUrl, str);
}
$("input[name='color']:radio").change(showValues);
});
More Info: http://api.jquery.com/serialize/
