View Full Version : Giving a name to a window

10-01-2005, 03:00 PM
Hi again. I'm not sure whether this would be HTML or not, but does anyone know if you can give a name to a window that isnt a pop-up? If so, how would you do it?

Thanks in advance.

10-01-2005, 04:50 PM
I don't understand. A window that isn't a popup? An existing window? Or do you mean a window created by target=? If the latter, target="windowname" will create a window called windowname.

10-02-2005, 03:35 AM
Sorry, I meant an existing window that the user opened themselves without a link, when they type the address in the URL bar.

10-02-2005, 04:47 AM
<script type="text/javascript">

However, this will name the window, not the page. Once this script has run, for as long as the window stays open it will have 'windowName' for its name unless changed by another script. This can have some uses though, I would think, like passing a variable to other pages that will appear in the same window. It cannot be used to override the prohibition against closing windows, not created by javascript, using javascript. It will also interact (replace/be replaced) with other variables called name, like in forms.

10-10-2005, 06:06 AM
What i needed to do was create a way for links in a javascript pop-up window to make another page appear in a seperate window that was already created. (i know it sounds kinda confusing).
Anyway, thanks for the help.

10-10-2005, 08:20 PM
In that case, name the other window when you create it, or use the method from my last post to name it at some point before the pop-up that you want to be able to access it by name is created.