Click to See Complete Forum and Search --> : close a popup window by clicking on exit
boroarke
05-18-2003, 06:02 PM
On my page, I have a link and when you click on a link a popup window pops up with a message. I want the user to be able to close that popup window by clicking on the Exit hyperlink at the bottom of the popup window so the main page is showing again. Could someone tell me how to code this? So basically what I need is to know the HTML code to close a window. Thanks in advance guys!!
brendandonhue
05-18-2003, 06:04 PM
<a href="javascript:window.close()">Exit</a>
boroarke
05-18-2003, 06:44 PM
Great! Thanks! that worked perfect. I now have another question if you can answer it.
Please bare with me, this may get confusing. I hope you will be able to understand:
On the same page, I have another link and again, when you click on this link a popup window opens up with more choices for the user to choose from. When the user clicks on one of the choices, I need another popup window to open from this popup window that will display a message and picture. So basically what I have is a main page with a link that open up a pop up window. On that pop up window I have another link that opens up yet another popup window. SO at this point we have the main page and a pop up window ontop of a popup window. GOt it? Now, the problem is getting this to work. When I click on the link in the pop up window to open up the next pop up window, its not actually opening up in a new window, it is opening up in the first popup window which I dont want bececause when the user closes the second pop up window, I want the first pop up window to stay open so the user can make more choices. This is the code I use to open up the first pop up window which worked fine.
<a onclick="window.open (this.href, 'child', 'height=300,width=495'); return false" style="color:#223767; font-weight:700" href="ptv300notice.htm">PTV300</a>
I used the same code for the second popup window but it did not open it in a new window, like I said, it opened it up in the first pop up window. Is there something I can change in the code so it will open up anouther window instead of opening in the first pop up window?
wheew...
Thanks!
brendandonhue
05-18-2003, 06:52 PM
I dont really know...but instead of having a popup window lead to another...why not have 1 popup where they can make their choice AND it will display the image in the bottom of the popup?
boroarke
05-18-2003, 07:24 PM
This is what I am trying to do. On my main page I have a link that opens up a popup window. In this window I have about 30 different model numbers of electronics. When they click on a certain model number in the popup window, I need another window to open telling the detailed information about that model number. If they dont like the model number they choose, they could close that second window and choose another from that first pop up window. ANy suggestions?
Lucky Punch
05-19-2003, 10:00 AM
Tip: use different window-names (eg child1 and child2) and it will probably work.
'Greetings from Vienna'
boroarke
05-19-2003, 10:10 AM
Thanks! it works great!
Vladdy
05-19-2003, 10:47 AM
Maaan, that is one annoying and unaccessible web site you have :rolleyes: :D :D
boroarke
05-19-2003, 10:51 AM
lol...actually, it sounds a lot worse then it really is. It was just hard to explain it without it seeming bad.