Making sure that server returns Ajax response within HTML DOM