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

How to refresh gannt chart based on dropdown values

Asked by vicky romanic
2 years ago.

I got two tables:
I got a dropdown{ Senior,Attendants,Drivers}- which is the data in designation field.When I select one option the data should be refreshed and give me the person in that designation group and their corresponding planned leave. But I'm stuck it did not work.Please find my coding in the file uploaded.Let me know my mistake.

A help will be more appreciated

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

The following tutorial includes a project that displays a drop-down list with locations:

When a user selects an item, the Scheduler view gets updated. The logic related to the drop-down list looks like this:

var locations = {
  list: [],
  find: function (id) {
    if (!locations.list) {
      return null;
    return locations.list.find(function (item) {
      return === id;
  element: document.querySelector("#locations"),
  activate: function (location) {
    var item = location;
    if (typeof location !== "object") {
      item = locations.find(location);
    } = [];
    dp.rows.load("backend_people.php", function (args) {, 0, {id: "L" +, name:, type: "location"});
    });"backend_assignments.php?location=" +;
  load: function () {
      url: "backend_locations.php",
      success: function(ajax) {
        locations.list =;
        locations.element.innerHTML = '';

        locations.list.forEach(function (item) {
          var option = document.createElement("option");
          option.value =;
          option.innerText =;

  init: function() {
    window.addEventListener("DOMContentLoaded", function() {
      locations.element.addEventListener("change", function(ev) {


Comment posted by vicky romanic
2 years ago.

No this does not work for me.

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