Well, that should work.
Are you sure the response text is exactly available? Try trimming the answer as follows:
if(xmlhttp.responseText.trim() == 'Available')
Do you have access to firebug? Try console.log (xmlhttp) to find out the exact value of responseText.
alexn Aug 10 2018-10-10 13:27
source share