La sintassi non e` corretta:

document.frames['nomeiframe'].location.href = ...;
oppure:
document.nomeiframe.location.href = ...;
oppure (meglio):
document.getElementById('ID_IFRAME').location.href = ...;