View Full Version : DHTML Modal Window - Cancel Button

08-28-2008, 03:55 PM
1) Script Title: DHTML Modal Window v1.1

2) Script URL (on DD):

3) Describe problem:
How to add a "Cancel/Close" button on my iframe's internal content page?

I'm using the dhtml modal window as an iframe. How can I add a "Cancel" button on my own content that works exactly as the "X" button does on the modal window?

<input type="button" name="cancel" onclick="?">

Thank you.

08-28-2008, 11:50 PM
Assuming on your main page you've opened a DHTML modal window using something like:

var agreewin=dhtmlmodal.open("agreebox", "iframe", "modalfiles/agreement.htm", "This Page's Terms of service", "width=590px,height=450px,center=1,resize=1,scrolling=0", "recal")

Within your iframe page, to add a "hide" button, the code would look like:

<input type="button" value="cancel" onclick="parent.agreewin.hide()">

08-29-2008, 02:16 AM
Thanks! Worked like a charm.