Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using multiple windows?

Status
Not open for further replies.

schworak

Programmer
Joined
Jan 9, 2001
Messages
9
Location
US
I have a javascript that opens a new window and displays a web page.

This second web page may run a javascript depending on what the user does there. If he/she does run the javascript, I want the output to go to the first window.

The question is, how do I tell the new window the name of the first window?

Is there a way to get this and pass it in the query string to the new window I am creating?
 
if you use:

mywin=window.open("somepage.htm")

the window that opened it can communicate with it like so:

mywin.whatever

the new window can communicate with the first one like so:

opener.whatever jared@aauser.com
 
The question is, how do I tell the new window the name of the first window? ---> the first window opened the 2nd one, it can be refered as (frome the 2nd one !!) "opener"

Is there a way to get this and pass it in the query string to the new window I am creating? --> i don't know what "this" was supposed to be, but the easiest ways to pass parameters are either using a hidden frame (while submitting a form) or adding them explicictly to the url (such as : my_new_page.htm?param1=value1&param2=value2)
 
OPENER! Love it... Thanks! I will give that a try.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top