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

Resource Header Click - JavaScript

Asked by Anonymous
8 years ago.


i got the following problem. I want that when i User click on a resource a JavaScript is WITH parameters (which item did he click) is executed. Thats what i got so far. It works fine but without any information on which item the User clicked

....ResourceHeaderClickJavaScript="test()" ResourceHeaderClickHandling="JavaScript" ...

<script language="javascript">
function test() {

I know how it works in the Code behind (c#) but i want to handle it with javaScript and not with PostBack.

thx for the help.

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

The resource header details are accessible using "resource" variable:

DayPilot Scheduler tag:
<script language="text/javascript"> 
function test(resource) { 
  var id =;
  var name =;
  var start = resource.start; // will be different from StartDate in Days mode
  alert("Clicked: " + name);
Comment posted by Anonymous
8 years ago.

Yes, this works perfect.
The important thing is to call the parameter exactly resource (like in the example above).

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