moved the ajax data objects into the click event function, thus the correct build type is transferred