Ok in summary what I am trying to do is disable a submit button based on an ajax call which is checking my database to see if data exists under a certain date.
At presen
Ok I figured it out. It transpires for whatever reason (Still cant find out where from) I was getting a newline on the returned ajax code and so albeit it was only blank space the if statement could not match the phrase I had asked it to check.
By using $.trim (found in jQuery 'If' statement string comparison not working) I removed the blank space and it all fired into life.
The new code now looks like this.
if ($.trim(xmlhttp.responseText) == "WARNING!! - PREVIOUS RECORDS FOUND") document.getElementById('FRINSUB').disabled = true;