close POPUP out of the main window?
to do a popup with the possibility to close it by a button/link inside of the popup is no prob.
But is it possible to set a link inside of the main window that closes the popup?
im looking inside this forum but didn't find the right for me
(maybe i understand not enought of js ;-) )
thanks for your help/ideas
set the popup as a global variable, thus later you may close it
popUp = window.open('mypopup','win');
thanks for the fast answer!
i put the code in a test file and it works fine.
thats the solution i'm looking for.
I am glad to hear that, as I rarely give wrong solutions...
Welcome to the Forum...!
popup close out of each window?
now opening and closing the popup out of the main window works fine.
But now there is another prob.
the close button is present on every page and the popup should be closed by clicking on the close button.
at the time this works only if i click first on the open button.
how can i solve this little prob?
thanks for help
Anyway, I will put this question in other forums as well. If I have a positive answer, I will let you know the solution.
thanks for the fast response.
my prob is, i had to put the possibility of sound in the site, and i dont want to use frames.
so my idea was to put it into a popup that can be closed by a button from every site of the project.
now it works only if the open button is clicked first (i think so a focus is set on the popup window)
i've thought perhaps it is possible to set the focus on the window and close it only by clicking on the close button.
ok hope you will find any ideas
i will google a little bit...
opening and closing a popup by a button out of the main window is no prob.
loading a new page the close button works only if the open button is clicked first.
now someone told me that the close button should be work in the following way:
1. test if the popup still exist
2. if not, using window.open and the same window name to create a new reference on it
3. close it immediately
i tryed a little bit, but i'm no coder. So if there is anybody that can tell me the right way i would be verry grateful.
Users Browsing this Thread
There are currently 1 users browsing this thread.
(0 members and 1 guests)