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

load data based on dropdown list

Asked by vicky romanic
3 years ago.

I am not able to load the duration bar and the names when a value from the dropdown get selected.
And also I want to have a dropdown with unique value.
My tables:
Person{id,first,last,Designation}
leave_event{id,person_id,leave_start,leave_end,priority_leave}
Coding to populate designation in dropdown

async function loadResources() {
const {data} = await DayPilot.Http.get("backend_employees_admin.php");
var select = document.querySelector("#employee");
data.forEach(function(item) {
var option = document.createElement("option");
option.value = item.id;
option.innerText = item.designation;
select.appendChild(option);
});
loadEvents();
}
/issue with the above code I'm getting duplicates of designations

To load data
I have created a view to connect leave_event_designation{id,person_id,leave_start,leave_end,priority_leave,Designation}
When selecting an option in drop down,no effects.
If some one can help me urgently.Thanks for your cooperation.

backend_employees_admin.php
backend_event_admin.php
index_admin.php

Answer posted by Dan Letecky [DayPilot]
3 years ago.
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.