Moved ajax send until after setup onreadystatechange function