I think the Ghaznavids and maybe the Khwarizmians used war elephants in the middle ages. But the Moslem and Hindu states of India used war elephants in the middle ages. So did the Khemer and Champans.