Not sure how to go by this but what i want to do is have my page A with a link on it that pops up another window B to choose some data with checkboxes. then click an ok button and have that data then displayed on page A
is this possible to do?
Bauke Scholtz
Ranch Hand
Joined: Oct 08, 2006
Posts: 2458
posted
0
In the popup window, you can access the parent window which opened the popup window using the window.opener property in JS.
Just backing up a step: why the popup in the first place? Very old-school and makes things dicey trying to keep two windows in sync. I rarely use them nowadays. I'd consider alternative approaches if it were me.
The opener reference "points" to the window instance of the opening window. You can reference anything defined on that instance -- top-level functions, for example.
Bear Bibeault wrote:Just backing up a step: why the popup in the first place? Very old-school and makes things dicey trying to keep two windows in sync. I rarely use them nowadays. I'd consider alternative approaches if it were me.
The opener reference "points" to the window instance of the opening window. You can reference anything defined on that instance -- top-level functions, for example.
well here is what i am trying to do. i have a screen that i am creating discount codes for a website. it will be like spend X amount and get X amount off. however when creating these codes i will have item and brand exclusions. i have 2 tables on that screen that will have the list of brands and items to exclude in the discount. i want to pop a search item and search brand picker so i can pick and choose which items and brands will be excluded then apply them to the main screen. The user may do this multiple times as they may exclude many different items and brands.
Bauke Scholtz
Ranch Hand
Joined: Oct 08, 2006
Posts: 2458
posted
0
John Schretz wrote:
how would i go by doing this. I have searched the net but i cant find a good example and my JS skills are not that great.
Then start learning JS and HTML DOM. The w3schools.com site provides nice tutorials and references.