naming a window

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I apologize in advance for what is probably a trivial Q...
How can I name a whole window?
So I read about targeting, and saw how name works for frames,
but suppose i want two windows open, cross referencing each other,
if i let the target mechanism name my windows and i start from
a simngle instance of window1
by clicking in it i will open window2 (naming it),
but clicking inside window2 will then open a NEW instance
of window1 (and name that)..

if i knew how to name window1 to begin with, clicking inside window2
would take me BACK to the first instance of window1 :-(


Re: naming a window

Quoted text here. Click to load it

There are lots of reasons you shouldn't do this, but here's how:

In the first link used to open the window, you need to add target="cake" to
the link. Since your browser can't find a frame with that name, it creates a
new one, which is usually a second window. Then any other links that
target="cake" will be opened in that second window as long as it's not

There is no other way to set the name of a "frame" or window outside of
framesets. You can use Javascript to do it probably, but I wouldn't know how
(try news:comp.lang.javascript).

Re: naming a window

gbgbgbgb wrote:

Quoted text here. Click to load it

cross referencing? Then you need to use the opener keyword and the
window object reference (window pointer to the popup window).

Quoted text here. Click to load it and target attribute have basically nothing to do with what
you describe here.

Quoted text here. Click to load it

If window1 was not created by javascript, then there is no need to name
(via target attribute) it the way you think you should.

  clicking inside window2
Quoted text here. Click to load it

Looks like a simple opener.focus() call here. I have a page that does
exactly that.

Quoted text here. Click to load it

You need to define and specify some webpage situation, a context
somehow: an url is usually the best. Spaghetti understood your post in a
certain manner, I understood it differently.

Javascript and Browser bugs: /

Re: naming a window

Thanks for the answers.
Dr. U. seems to have understood best where I was going.
Quick wrap comments:
- i'm doing it for myself (data vis) so no use educating me not to do it...
- what i really wanted/needed was to re/name an already existing window
- alas, i'm only starting to go beyond trivial html, and javascript
  won't join too soon.

Solution: I've just added a third window (and justified it :)
to open and name the two cross-reffing windows.

Thank you!

Re: naming a window

gbgbgbgb wrote:
Quoted text here. Click to load it


Mark Parnell

Site Timeline