enable ajax for submitting urls, wire up success or failure in js