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

How to hand over parameters on JavaScript Action

Asked by Mark
9 years ago.

Hi there,

I'm a new DayPilot user and maybe this is a simple one.

I configured a context menu for Scheduler to open an external Dialog (SharePoint). Now I want to hand over the selected event date and resource in my URL string. How can I achieve this?

Here is some sample code. I want to fill eventdate and resource Parameters.

<DayPilot:MenuItem Action="JavaScript" Text="Neue Abwesenheit" JavaScript="openInDialog(600,400,true,true,false,'http://www.google.de?eventdate=&resource=');" />

Best regards,
Mark

Answer posted by Dan Letecky [DayPilot]
9 years ago.

The menu source object is available as "e" variable. In this case, it is the selection object which has three properties (start, end, resource):

<DayPilot:MenuItem Action="JavaScript" Text="Neue Abwesenheit" JavaScript="openInDialog(600,400,true,true,false,'http://www.google.de?eventdate=' + e.start + '&resource=' + e.resource);" />
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.