I tested status.php return value with var_dump($result) and alerted it out in check() function like this:
function check() { $.ajax({
Ajax may not be returning a boolean true or false, rather a string.
true
false
So try and put true in double quotes:
if(data=="true")
You can also use the trim function on data to ensure no whitespace is present in the returned data, like so:
trim
if($.trim(data)=="true")