Results 1 to 2 of 2

Thread: Show/Hide the 'x' button on the modal window based on our needs?

  1. #1
    Join Date
    Jun 2014
    Thanked 0 Times in 0 Posts

    Default Show/Hide the 'x' button on the modal window based on our needs?

    1) Script Title:
    DHTML Modal window v1.1

    2) Script URL (on DD):

    3) Describe problem:
    Is it possible to hide/show the 'x' button on the modal window based on our needs? I like to use this widget for a popup window on my site that is open automatically on the page load. This window should stay open for a certain amount of time and later have the 'x' button or a 'Close' link displayed for user choice.

    Is something like this possible with this widget?

    Thanks in advance.

  2. #2
    Join Date
    Mar 2005
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries


    Yes, using css. For example, to hide the one in the age box on the demo page, add this to a stylesheet for the page:

    #agebox img[title='Close'] {
    	display: none !important;
    You can do this for any model box, just substitute the id for that box for 'agebox' in the above.

    The browser cache may need to be cleared and/or the page refreshed to see changes.

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
    - John

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. DHTML Modal window v1.1 - Close button
    By sammah in forum JavaScript
    Replies: 0
    Last Post: 07-04-2011, 06:20 PM
  2. Show/hide div based on cookie value
    By bigalo in forum JavaScript
    Replies: 2
    Last Post: 11-12-2009, 06:24 PM
  3. jQuery hide() and show() based on a select element.
    By nicksalad in forum JavaScript
    Replies: 3
    Last Post: 10-08-2009, 12:28 PM
  4. onload modal window (IP Based)
    By TheJoshMan in forum Looking for such a script or service
    Replies: 11
    Last Post: 10-23-2008, 02:20 AM
  5. Hide GrandParent through Modal Window
    By baldwasagar in forum JavaScript
    Replies: 3
    Last Post: 08-20-2008, 03:22 PM


Posting Permissions

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