Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to perform a specific action when a date is clicked?

Action clicked perform
0
Posted

How to perform a specific action when a date is clicked?

0

For example, you want to perform the alert() function. • If you want to perform it just before the date gets selected You need to put it into the fOnChange() callback plugin in the plugins.js file, as following: function fOnChange(y,m,d) { if (d>0) alert([y,m,d]+’ will be selected.’); return false; // return true to cancel the change. } • If you want to perform it just after the date gets selected You need to put it into the fAfterSelected() callback plugin in the plugins.js file, as following: function fAfterSelected(y,m,d) { alert([y,m,d]+’ has been selected.’); } Or, you may also choose to put it into the gsAction option in the theme-name.js file, as following: var gsAction=”alert([y,m,d]+’ has been selected.’);”; Note you may also use pre-defined popup() function (in plugins.js) to open up any URL in the current window or a new window. e.g. function fAfterSelected(y,m,d) { popup(‘http://www.calendarxp.net’, ‘_top’); } Or even startup your email client by using “mailto”. e.g.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123