Page name
Moderator: General Moderators
-
Shendemiar
- Forum Contributor
- Posts: 404
- Joined: Thu Jan 08, 2004 8:28 am
Page name
How do i identify my page so that i can later open links to it by target="something"
I can name Frames and even whole pages when created by javascript, but how do i name a page using html?
I can name Frames and even whole pages when created by javascript, but how do i name a page using html?
-
Shendemiar
- Forum Contributor
- Posts: 404
- Joined: Thu Jan 08, 2004 8:28 am
Targets can be opened into whole windows also, not just frames. If i make a popup window with javascript, i can give a name to it and use that name later/elsewhere in the document to open links in that window.
I need to know how can i name a window by other methods than javascrip.
Javascript
will open a window by name "somename"
will open into the newly created window named "somename"
But what is the name of the default window that gets opened when browser opens? Can it obtain a name from code somewhere somehow?
Can i at least receive the default name by some script?
I need to know how can i name a window by other methods than javascrip.
Javascript
Code: Select all
open(url,"somename",attributes);Code: Select all
<a href="something" taget="somename">link</a>will open into the newly created window named "somename"
But what is the name of the default window that gets opened when browser opens? Can it obtain a name from code somewhere somehow?
Can i at least receive the default name by some script?
Last edited by Shendemiar on Sun Oct 17, 2004 4:00 pm, edited 1 time in total.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
Shendemiar
- Forum Contributor
- Posts: 404
- Joined: Thu Jan 08, 2004 8:28 am
The case is that i have a window and a link there that opens a popupwindow with some stuff in it. There I need to have a link that opens stuff back in the original window.
The only problem is that the original window doesn't have a name i could use in the href target.
Can i receive something (name, pointer, object etc) with this javascript window.self stuff?
(and pass it as a php variable to the popup window when it's created and that way include it in the link in the pop-up window)
The only problem is that the original window doesn't have a name i could use in the href target.
Can i receive something (name, pointer, object etc) with this javascript window.self stuff?
(and pass it as a php variable to the popup window when it's created and that way include it in the link in the pop-up window)
-
Shendemiar
- Forum Contributor
- Posts: 404
- Joined: Thu Jan 08, 2004 8:28 am
Okay, i got it!
Javascript:
Did a lot of good for me

Javascript:
Code: Select all
<?php
echo " window.self.name='main' \n";
?>