working ajax for interval record button