naming a window

G

gbgbgbgb

Hi,

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 :-(

Thx!
-g
 
S

spaghetti

gbgbgbgb said:
So I read about targeting, and saw how name works for frames,
but suppose i want two windows open, cross referencing each other,

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
closed.

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).
 
D

DU

gbgbgbgb said:
Hi,

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,

cross referencing? Then you need to use the opener keyword and the
window object reference (window pointer to the popup window).
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)..

window.name and target attribute have basically nothing to do with what
you describe here.
if i knew how to name window1 to begin with,

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
would take me BACK to the first instance of window1 :-(

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

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.

DU
 
M

Mark Parnell

gbgbgbgb said:
Hi,

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)..

http://diveintoaccessibility.org/day_16_not_opening_new_windows.html
 
G

gbgbgbgb

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!
-g
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,075
Messages
2,570,554
Members
47,197
Latest member
NDTShavonn

Latest Threads

Top