Records data via Ajax request