Results 1 to 3 of 3

Thread: DHTML Modal Window - Cancel Button

  1. #1
    Join Date
    Aug 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DHTML Modal Window - Cancel Button

    1) Script Title: DHTML Modal Window v1.1

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...dhtmlmodal.htm

    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.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Assuming on your main page you've opened a DHTML modal window using something like:

    Code:
    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:

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

  3. #3
    Join Date
    Aug 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks! Worked like a charm.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •