ref: http://mattberseth.com/blog/2007/05/ajaxnet_example_using_an_updat.html