|
Post by Old Shendemiar on Oct 17, 2004 20:50:10 GMT
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
Code:
open(url,"somename",attributes);
will open a window by name "somename"
Code:
<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?
|
|
|
Post by sparrowhawk on Oct 18, 2004 9:44:57 GMT
I'm not sure that it has a name.
Use document.opener to refer to the page that opened the sub pages.
HTH!
|
|
merlin
Public Area Guest
Posts: 19
|
Post by merlin on Oct 18, 2004 14:30:19 GMT
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 Code: open(url,"somename",attributes); will open a window by name "somename" Code: <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? I think you can name it in your page... You may have to have your page as a single frame though? Anyway "_self" to pick up your main window. Others are _blank _top _parent <html> <head> <title>Single Frame Page</title> </head>
<frameset rows="*"> <frame name="whatevernameiwant" src="new_page_2.htm"> <noframes> <body> <p>This page uses frames, but your browser doesn't support them.</p>
</body> </noframes> </frameset>
</html>
|
|
|
Post by Old Shendemiar on Oct 19, 2004 20:03:40 GMT
One can't name page by any other means than by javascrip:
this.window.name='somename'
but thats fine too, use that later in hrefs in other windows to open document to the named one.
|
|