Code:
window.close();
opener.getElementById('textfield').value = '#post.id#';
here you are closing the window with the javascript before you are assigning the post.id to the opener page.
additionally, assigning anything to the opener would probably only work if the page was already loaded. since you are changing the URL in the opener, more than likely your javascript will be executed before the page loads.. so i'm guessing it would not work.
why don't you just send the post id in the url?
example:
Code:
function javascriptpenpopup(url)
{
window.opener.location.href = url+'?postid=#post.id#';
window.close();
}
i don't know cold fusion, but i think that would work. you just have to know in the parent page how to read a variable from the URL.