Q:

getElementID dont work on chrome

I have a code like this:  
parent.document.getElementById("test").value ="1";

but it doesnt work on chrome. The error is:

"Uncaught TypeError: Cannot call
  method 'getElementById' of undefined"

any help is apreciated thanks in advance! :)

A:

document.getElementById("test").value ="1";

parent of the scope (window) is null

