I still can not get field value from popup window to xpage

I have a xpage with a text control named “inputtext” and a button. If I click the button, it will popup a window with a text field named “message” and a button. I want to return the “message” field value to “inputtext”.I write the code to the button on the popup window.

window.opener.document.getElementById(“#{id:inputtext}”).value = window.document.forms[0].message.value

But it returns “is null or not an object”. Can anyone help me ? Thanks in advance.