PDA

View Full Version : Window widget, open new and close self



mrboboz
04-09-2007, 03:35 PM
1) Script Title: DHTML Window widget

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm

3) Describe problem: How to open new window from widget and then close widget.

Hi,

I'm opening a window (with this script) from my website. In the window is a question with 2 buttons, YES and NO. If NO the window should close. if YES an new website opens and the window it self closes.

Just closing is not a problem, but I can't open a new website and closing the widget window. Also, I want to open the new website as it opens when you click a link with target="_blank" and not as a javascript popup.

Below is an example of what I did, but this only shuts the window down.

<a target="_blank" href="http://www.website.com" onClick="parent.googlewin.hide(); return false">

//Thanks Bo

mburt
04-09-2007, 08:03 PM
Remove the onclick event handler, just to do the oposite:

<a target="_blank" href="http://www.website.com">