PDA

View Full Version : Javascript Popup, close and redirect



Takaya213
July 9th, 2007, 03:34 PM
Hi all

I have a popup that opens with the main menu of the website at the top of the popup. Now I want to be able to close the popup when you click on a menu item and the page must display on the link that was clicked in the popup, (that is the main browser window, where the popup originated from).

How do I do this? I'm really lost, I tried onClick="window.close(); window.redirect('index.asp');" and of course it doesn't work, please help urgently if you can.

Thanks,
T'akaya213

borrob
July 10th, 2007, 08:10 AM
i've seen it done so it's probably possible. It's on the other hand not such a good idea to do it in this manner. Most people now use a popup blocker so your menu system will not be accesable to these people.
What you could do is put your menu in a layered div so that it appears to be a popup. In this way you also have more control from within the page because you can use the javascript in the same page....