PDA

View Full Version : dhtmlwindow - iframe closing window and changing parent window



georgie_b
03-08-2008, 11:10 PM
1) Script Title: DHTML Window widget

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

3) Describe problem: it's fairly similar to this one http://www.dynamicdrive.com/forums/showthread.php?t=26471&highlight=this.name%3D%27bobo_1

I've a window which I want to open an iframe with - but there's a contact us link, when people click on that, I'd like to close the widget window and alter the parent page so that it's got the details described in the link.

Here's the main page (http://www.stickytoffeedesigns.com//pop/sales3.htm) (about half way down the page in bold in the first table) - which opens the widget and the further info link on the widget window (http://www.stickytoffeedesigns.com//pop/jasper3.htm) is at the bottom. The links are in bold.

Rather than opening the google window in the parent window below and closing the widget window, it opens google in the widget.

I'm new to all this so I'm sure it's me doing something daft. Any suggestions would be gratefully received. :)

ddadmin
03-09-2008, 12:59 AM
For links inside the DHTML Window (iframe launched), you can simply get them a target attribute of _top to get them to open back in the parent window:


<a href="http://cnn.com" target="_top">CNN</a>

georgie_b
03-09-2008, 06:52 PM
Fantastic, thanks! :)