Results 1 to 2 of 2

Thread: DHTML Widget text link to close popup

  1. #1
    Join Date
    Aug 2006
    Posts
    27
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default DHTML Widget text link to close popup

    1) Script Title: DHTML Window widget

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

    3) Describe problem:

    All I need to know is how to add a text link that will close the window. You can see where I'm using the popup here:

    http://www.musclegaintruth.com/

    I just want to add a small text link in the bottom right corner that will close the popup and shut off the contents inside (so the video stops playing too).

    Thanks!!

    Sean

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

    Default

    Simply call dhtmlwindowvar.close() to close a window. For example, if the window was opened using:

    Code:
    googlewin=dhtmlwindow.open("googlebox", "iframe", "http://google.com", "Google Web site", "width=700px,height=450px,resize=1,scrolling=1,center=1", "recal")
    To close it with a link would look something like:

    Code:
    <a href="#" onClick="googlewin.close(); return false">Close Window</a>

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
  •