function getdetails(){
var id = ?;
$.ajax({
type: "POST",
url: "main.php",
data: {id:id}
}).done(function( result )
{
$(".file").html( result );
});
}$(this).attr('id');, но возвращает undefined.