Results 1 to 2 of 2

Thread: Close button function for modal windows

  1. #1
    Join Date
    Dec 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Close button function for modal windows

    1) Script Title: :HTML Modal window v1.1

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

    3) Describe problem:

    I would like to call a function when the window is closed via the close button but not when it is closed any other way.

    Is there an already implemented way of doing this?

    I assume the way to do this is to add a new property in the constructor and set it to null there and execute the function pointed to by that property (if not null) in the code that implements the close button. Is that a good approach?

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    You can either use something like this.

    Or just not put a button that has the onClick event:
    Code:
    parent.window.hide()
    Jeremy | jfein.net

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
  •