[thelist] Window names - Javascript
rudy limeback
r937 at interlog.com
Tue May 30 00:51:17 2000
> What is the name of the intial window opened by a browser?
> I'm opening a pop-up window and I want to reference a text
> area in the main window from it.
hi norman
resident javascript guru jeff is on vacation at the moment
i'm sure he will see this and correct me if i'm wrong
i don't think the initial window has a name, nor can you set it (or, if you
can, you can't do so in all browsers)
but you *can* make a reference in a popup to the window that opened it
one typical example is when the popup has a bunch of links, like a nav bar,
and you want a clicked link to open in the original window
<a href="javascript:void(opener.location='foobar.html')"
>open foobar in main window</a>
i expect jeff will have a more robust version of the above, but at least it
works
i once had a whole mini-site on my company's intranet that used the popup
nav bar as a kind of "remote control" that you could bring up (or back to
the front by giving focus to) by clicking a small icon on each page in the
original window -- it worked like a nav bar in a frame, except the nav bar
was in a floating popup, so the original window didn't lose any real estate
for the nav frame... this was before "slidey" dhtml menus ala webmonkey
referring to a textarea would be similar, something like (warning:
untested) --
opener.document.formname.textareaname
_____________
rudy limeback
http://r937.com/
http://evolt.org/