PDA

View Full Version : Show/Hide the 'x' button on the modal window based on our needs?



kmantrip
06-12-2014, 02:40 PM
1) Script Title:
DHTML Modal window v1.1

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

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.

jscheuer1
06-12-2014, 05:24 PM
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.