Carved in mystic runes upon the very living rock, the last words of
Richard Cornford of comp.lang.javascript make plain:
[color=blue]
> Alan Little wrote:
>[color=green]
>> I have a popup which contains a frame set; one of the frames
>> contains a form. When the form is submitted, I want it to
>> go back to the opener of the popup. I have:[/color]
>
> So you are not writing something suited to Internet use.[/color]
Perhaps not.
[color=blue][color=green]
>> document.forms[0].target = parent.opener;[/color]
>
> The - target - property of forms is a string, - parent.opener - will be
> a reference to an object (a window object) (or null). When you assign -
> parent.opener - the object will be type-converted into a string, and
> that string will be, for example, "[object]" in IE and similarly
> unhelpful values in other browsers.[/color]
Ah, I see.
[color=blue]
> The value you should assign to the - target - is the (string) name of
> the window, and that name value is available as - parent.opener.name -,
> so that is the value you assign:-
>
> document.forms[0].target = parent.opener.name;[/color]
Yes, that works. Thank you.
--
Alan Little
Phorm PHP Form Processor
http://www.phorm.com/