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

MenuItem wehere Command=Delete and Action=JavaScript fails

Asked by Morten
14 years ago.

My code:

<DayPilot:MenuItem Text="Delete" Action="JavaScript" Command='Delete' JavaScript="if (confirm('Delete ' + e.text() + ' ?')) dps1.eventMenuClickCallBack(e, command);"></DayPilot:MenuItem>

Js: Error: 'command' is undefined.

Error also on http://www.daypilot.org/demo/Scheduler/

Comment posted by Ante
13 years ago.

Yes...I've got the same.

Comment posted by Jason
13 years ago.
I had the same issue. Apparently in the latest version they don't define the Command parameter. So I just replaced Command with the literal command 'Delete' and that worked like such: ... Text="Delete" Command="Delete" Action="JavaScript" JavaScript="if (confirm('Do you really want to delete this event?')) dps1.eventMenuClickCallBack(e, 'Delete');"
Comment posted by Dan Letecky
13 years ago.

This is fixed now in the sandbox (since build 6.1.2121).

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