SyntaxFix
Write A Post
Hire A Developer
Questions
change it to
$.post({ url = 'getData.php', data : { 'id' id } , dataType : 'text' });
This way ajax will not try to parse the data into json or similar