I'm having a problem sending data back by $.post. This is my JS code for $.post :
$.ajaxSetup({ cache: false });
$.post(
"run.php",
{ q: cmd , dir: dir },
function(data, status){
$("#results").html(data);
}
);
and in run_php :
// I run python code using q and dir. It works fine.
foreach ($fileArr as $key => $value) {
echo '<p><a href="'.$default_dir.'/'.$value.'" target="_blank">'.$value.'</a></p>';
}
// But here it doesn't return any value.
It works in Chrome and Firefox, not in IE. What could be the problem? This code is so simple but I'm struggling for hours. Thanks in advance.