Advanced Search

Results 1 to 4 of 4

Thread: Window Widget hide close button, close with esc

  1. #1
    Join Date
    Mar 2012
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Window Widget hide close button, close with esc

    Window Widget

    http://www.dynamicdrive.com/dynamici...ndow/index.htm
    http://www.dynamicdrive.com/dynamici...dhtmlmodal.htm

    I need to customize the script in two ways.

    First I will be using the script in two different ways on the same page. I need to use it as a mouseover popup in which case I do not want to display the close button. The other method will be as a modal in which case I need the close button. Is there an easy way to hide the close button based on my usage?

    Second I would like an idea of how to close the modal version when the escape key is pressed?

  2. #2
    Join Date
    Nov 2010
    Posts
    10
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    1. You would need to create a new function within the file itself that will be called using an onmouseover event. It accesses the className='Close' and change display from display:; to display:none;

    2. Capture keyboard 'Escape' keydown event and return objectName.Close()

  3. The Following User Says Thank You to c1lonewolf For This Useful Post:

    twright6 (03-03-2012)

  4. #3
    Join Date
    Mar 2012
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I understand the concept on #2, however your solution for causing the close button to disappear I am not following (#1), can I ask for more detail?

  5. #4
    Join Date
    Mar 2012
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I finally got a handle on your idea, but since I use the ajax method of populating the content area, there was always a flash of the close button while the content was being fetched. I wound up modifying the script to accept another attribute I called 'close' and when it equals 1 then the script creates the 'drag-control' div complete with buttons, when it is 0 it produces the 'drag-control' div with no buttons. Thank you for your suggestion. I believe I am now on the way to making use of the same script via mouseover and modal mode.

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
  •