Board Logo

close model cal on focus?
etailored - 5/30/2007 at 09:41 AM

Hi, Using the model mode of the Pro version, and i want to enable the calendar to close if the user clicks anywhere on the screen, as in if the user clicks off the cal area then the calendar will close?

How is this done?


tigra - 5/30/2007 at 04:20 PM

you can save the reference to the calendar object in a variable:

var myCal = new calendar(CAL_INIT1, CAL_TPL1);

then you can use this reference to call code that hides the calendar:

if (myCal.TC3b) myCal.showcal()

so what's left is to detect the event you want (i.e. click anywhere on the screen) and call this code. Here is where you may experience the problem as your HTML document will not be notified about the events beyond the browser window.

Back to forum: