PDA

View Full Version : DHTML Window resize



aka Robbie
07-10-2007, 08:09 AM
1) Script Title:
DHTML Window widget (v1.03)

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

3) Describe problem:
I have the DHTML Window widget working well and opening up with iframe content. However what I wish is for a link within the iframe to be able to resize the open window.

aka Robbie
07-10-2007, 10:43 AM
Sussed it!!!

It comes down to giving the link to resize and change the window the same iframe name as the original:

ie if you had:
dhtmlwindow.open('myfirstwindow', 'iframe', 'www.someurl.html', 'A fancy title', 'width=770px,height=480px,resize=0,scrolling=0,center=1', 'recal')

the link to keep the same window but resize it would be:

parent.dhtmlwindow.open('myfirstwindow', 'iframe', 'www.somedifferenturl.html', 'A different fancy title', 'width=500px,height=200px,resize=0,scrolling=0,center=1', 'recal')

Seems so simple when you see how :o

To see it in action have a look at:
http://www.metadigm.co.uk/partners/checkpoint/index.php

In the "Resources" box click on "view online demonstrations" and then pick one of the three:cool:

ddadmin
07-10-2007, 07:38 PM
Yep, thanks for sharing how you resolved it. In general you navigate back to the parent window in JavaScript using "parent.".

George