Creating events and items with ajax