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


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

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


window.opener.document["nameForm"].[b]somename[/b].value;

now the problem is this


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

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


    window.opener.document["nameForm"].othersomename.style.display="";

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


window.opener.document["nameForm"].getElementById("othersomenid").style.display="";

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 1.5.0.9 in linux

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

Try this.

window.opener.document.getElementById("someid").value;