Board Logo

Dismiss MODAL calendar when clicking outside it?
Marcus - 9/28/2005 at 10:36 PM

Edited my original subect to say MODAL not POPUP. Sorry for the confusion.

I'd like to close the modal calendar if the user clicks anywhere else on the form. Right now they have to click the button again to close it. Any way to do that?

Marcus - 10/12/2005 at 05:52 AM

I'm still a JS novice so I'm just grasping at straws here. But I was thinking that if I knew of some global variable that was set when the calendar was open, I could reference that in the onClick event of my form. Then I could issue a showcal() call if the variable was that value, else do nothing. But I obviously can't make heads nor tails of the calendar.js file to even fathom what I could reference.

Please help me out here. It's a (admittedly) minor annoyance for my users, especially since I have a couple of other popup menus that dismiss when clicking outside of them. Thanks.

Back to forum: