this is the meat of a response from an successful ajax query:
if (data.tx) { document.cookie = "tx = " + data.tx; $(\'#fortune