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

eventMenuClickCallBack

Asked by Joacim
16 years ago.

Hello Dan,

I know that I can call the eventMenuClickCallBack from a JavaScript but what about the TimeRangeMenuClick event, can this also be called from JavaScript?

Comment posted by Dan Letecky
16 years ago.
Hi Joacim,

Yes, it's possible. Please check this thread: http://forums.daypilot.org/Topic.aspx/158/how_do_i_show_context_menu_on_highlight_event

Let me know if you have any troubles with that.
Comment posted by Anonymous
15 years ago.

I looked through the thread you you pointed to and this doesn't answer my question (or perhaps I didn't see the answer).

I would like to fire the TimeRangeMenuClick event from JavaScript -- something like:

dpc1.eventMenuClickPostBack(e, command);

Obviously *this* code won't work because "e" is not the right "kind" of event. So perhaps the following is in order:

dpc1.eventSelectionMenuClickPostBack(e, command);

I need to fire this event (rather than the TimeRangeSelected event because I need the value of command.

Thanks!

Comment posted by Dan Letecky
15 years ago.

The function you are looking for is called timeRangeMenuClickPostBack(selection, command, data).

You can acquire "selection" by calling dpc.getSelection(). "command" is just a plain string. "data" is a custom object that will be passed to the server-side handler as JSONData.

You could also use plain timeRangeSelectedPostBack(selection, data). Your custom string (command) can be passed to the server using the "data" parameter.

For more details on using "data" parameter see also http://www.daypilot.org/daypilotscheduler-sending-custom-data.html.

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