View Single Post
  #1 (permalink)  
Old 02-17-2007, 11:13 PM
dr_pompeii dr_pompeii is offline
Junior Member
 
Join Date: Feb 2007
Posts: 2
dr_pompeii is on a distinguished road
iTrader: (0)
Default 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

Code:
window.opener.document["nameForm"].getElementById("someid").value;
well this doesnt work
now if the element is a textinput how
Code:
<input type="text" name="somename" value="" id="someid"/>
i can use this to avoid the problem
Code:
window.opener.document["nameForm"].somename.value;

now the problem is this
Code:
<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
Code:
window.opener.document["nameForm"].othersomename.style.display="";
i recive the error message
window.opener.document.nameForm.othersomename has no properties
or
Code:
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
Reply With Quote