このコードを削除するのを手伝ってください
var fileexists=0;
var name="sample.txt";
$.post("aaa.php?do=checkfileexists",{filename:name},function(data) {
if ((data == "0000") || (data == "0000")) // file not exist .
{
fileexists=0;
}
if ((data == "1111") || (data == "1111")) // file exist .
{
fileexists=1; // file exits .
}
});
alert(fileexists);
データは 1111 を返しましたが、fileexists in alert show 0 なぜ ?!!!