search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Conditionally appearing MessageBox(JavaScript)

Asked by Anonymous
13 years ago.


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.

Comment posted by Dan Letecky
13 years ago.
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 Torben K.
13 years ago.

Thank you again

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.