moving between 2 windows - what if opener has been closed!!

Javascript coding ..

Moderators: macek, egami, gesf

ChrisSkidmore
New php-forum User
New php-forum User
Posts: 19
Joined: Sun Aug 18, 2002 4:02 am
Location: Germany

moving between 2 windows - what if opener has been closed!!

Postby ChrisSkidmore » Mon Jan 13, 2003 12:28 pm

I would be grateful for any ideas with this one.

Can I assign a name to a window after it's opened.

I want to be able to move back and forth between two.

My first window opens a second called "secondwindow"

Moving between the two as "opener" and "secondwindow" is no problem unless some shuts the "opener" window.

I'd like to them be able to "reopen" the origonal window and carry on.



Chris

User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

Postby Joan Garnet » Mon Jan 13, 2003 1:27 pm

I think you can change the window name even if the page is already loaded:

Code: Select all

<script language="JavaScript">
//just loaded we assign a name to the window
this.window.name="my_window";
alert(window.name);
//function that changes the name on run time
function my_change(){
   this.window.name='my_window2';
   alert(window.name);
}
//check if
function my_change2(){
   alert(window.name);
}
</script>

</HEAD>
<BODY>
<a href="#" onclick="my_change()">change the window name</a><br>
<a href="#" onclick="my_change2()">check the window name</a>
</BODY>

bye!

ChrisSkidmore
New php-forum User
New php-forum User
Posts: 19
Joined: Sun Aug 18, 2002 4:02 am
Location: Germany

Postby ChrisSkidmore » Mon Jan 13, 2003 10:06 pm

Looks wonderful

Many thanks

Chris


Return to “JavaScript”

Who is online

Users browsing this forum: No registered users and 2 guests

cron