Home Unanswered Active Tags New Question

Conditionally appearing MessageBox(JavaScript)

hi,

I want toshow a MessageBox in my EventMove. My problem is, that the MessageBox should not appear every time an Event moved. It only should shown bye some conditions. So I have to set the JavaScript only when the conditions are met. Any idea how i can handle this?

Thank you,

Torben K.

Asked by Anonymous 4 years ago.
Replies
There can be only a single JavaScript handler of move event. That means you can't set different handlers for different events.

There are two options:
  1. Check the condition on the client side in the in the JavaScript handler. You can pass the necessary parameters in Tags field.
  2. Check the condition on the server side. You can evaluate the condition and send the result back using Update("your string"). Assign AfterRenderJavaScript handler and check the value of data parameter (it will contain the string you passed to Update()). Then show the dialog if necessary. See also (F) Sending custom data back to the client after a CallBack (DayPilotCalendar & DayPilotScheduler) in DayPilot Pro 4.1 release notes for more details.
Comment posted by Dan Letecky 4 years ago.

Thank you again

Comment posted by Torben K. 4 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java