Partial Code:
My below code pulls a query from my DB and then uses inner.HTML = to display the data inside a div. It works fine in it original use....
Howeve
I think what you want is:
parent.getElementById('posts').innerHTML = 'why doth this faileth?';