getElementById problem in Google Chrome
Finally i figure what was the problem. I try the code from above on Google Chrome on a system local file. Due the security settings of Google Chrome this usecase is impossible. If i move all files on a web server this will work as a charmThanks all for your support, this thread can be closed now
Use contentWindow.document
instead of document
:
var frame = window.parent.frames[0].contentWindow;alert(frame.document.getElementById('textToSearch').value);
You can also just use contentDocument
for most browsers, but not Internet Explorer 7 or older.