@Bruno17, thanks and i already was using a variant of that. I had a php file containing my snippet code. It is this file that my ajax calls and I used a file because I dont know how to reference a modx resource/snippet from an ajax call. I linked a js file containing the ajax call in my template head tag. My short hand get call here below
$.get('how do I reference a resource/snippet here',{id:id},function(data){
in my js file I actually put the relative url of the file i.e. assets/snippets/file.php. Ok thats my variant. Moving on...
I took some advice from your reply. I created a chunk with just [[+content]] placeholder and since I was already getting the resource object before, I did
echo $modx->getChunk('myTpl',$resource->toArray());
This worked fine some. Now chunks and snippets are loaded but TVs are not loaded. That is another issue as I will need TVs heavily on the site.
So my question now is how to get the TVs too to load or if your approach will solve that, how do I reference s resource/snippet from an ajax call.
Thanks