window.opener.document["nameForm"].getElementById("someid").value; doesnt work

Hello guys

i really need your help

i have a popup window, then when i finished (pressing submit button) call onSubmit
method of the form and then call some method in javascript (the js file is an external file) and use some sentence how this


well this doesnt work
now if the element is a textinput how

<input type="text" name="[b]somename[/b]" value=""  id="[b]someid[/b]"/>

i can use this to avoid the problem


now the problem is this

<span name="othersomename" id="othersomenid" style="display:none;">
    <h1>some data</h1>

with span the name property is ignored
so if i use this


i recive the error message
window.opener.document.nameForm.othersomename has no properties


i recive this error message:
window.opener.document.nameForm.getElementById is not a function

pls, how i can resolve this???

thanks so much for advanced

BTW : i am using firefox in linux

getElementById() is only a method (function) of document. IDs must be unique.

Try this.