Hallo Steffen,
document.location = targetlink;
location ist immer noch ein Unterobjekt des window-Objekts - auch ein frame ist ein window - hier mußt Du also ansetzen.
Und location ist außerdem noch kein string, sondern hat ein Unterobjekt "href" vom Typ string. Damit wir dich jetzt nicht ganz verzweifeln lassen:
parent.location.href = targetlink;
Viel Erfolg,
Robert