Changing value of input in parent document

I have the following structure:

<html><body>
...stuff ..
<input id="test-input" type="text" />
<iframe id="test-frame" src="whatever.php" />
.. more stuff ..
</body></html>

I need to change value of “test-input” from within that iframe. Typically I’d use

parent.document.getElementById('test-input').value = 'whatever';

but the problem is, iframe and document are on different domains, so I can’t access parent.document

Is there some workaround for it? I have full access to both top and iframe document, so can add any javascript to both.

Can the child execute a parent function, that changes it instead?

Tested it, parent function can’t be executed. Getting error “permission denied to access property ‘testFunction’”

You may require a cross-domain communication solution then, one of which is easyXDM

Thanks!