Hello ,
function init() {
scheduler.config.xml_date="%Y-%m-%d %H:%i";
var sections1=[
<?php foreach($courselist as $key=>$val) { ?>
{key:<?php echo $val->courseid; ?>, label:"<?php echo $val->cname ; ?>"},
<?php } ?>
];
var sections=[
{key:-1, label:"Select Topic"},
];
scheduler.config.prevent_cache = true;
scheduler.config.lightbox.sections=[
{ name:"course", height:21, map_to:"course", type:"select",options:sections1 ,focus:true,onchange:updateSecondList},
{name:"topics", height:130, type:"select", options:sections, map_to:"topic_id"},
{name:"location", height:43, type:"textarea", map_to:"details" },
{name:"time", height:72, type:"time", map_to:"auto"}
]
scheduler.config.first_hour=4;
scheduler.locale.labels.section_topics="Topics";
scheduler.locale.labels.section_course="Course";
scheduler.locale.labels.section_location="Description";
scheduler.config.details_on_create=true;
scheduler.config.details_on_dblclick=true;
scheduler.config.cascade_event_display = true;
scheduler.init('scheduler_here',new Date(),"week");
scheduler.setLoadMode("week");
scheduler.load("02_dynamic_loading_connector.php?branch=<?php echo $_REQUEST['branch']; ?>&department=<?php echo $_REQUEST['department']; ?>");
var dp = new dataProcessor("02_dynamic_loading_connector.php?branch=<?php echo $_REQUEST['branch']; ?>&department=<?php echo $_REQUEST['department']; ?>");
dp.init(scheduler);
}
function updateSecondList()
{
var course = this.value; //selection from first list
var topicList = scheduler.lightbox.get_select_control( scheduler.formSection("topics") );
}
I want to chnage topics cobolist values depend selected course value.
For that i write a function updateSecondList. In this function i can get value of course combo list. But now i don’t know how to update topics values with new values in this function using course value.
I have two tables in database. one is coursemaster and other is topicmaster. all topicmaster values are depend on course value.
Please can anybody help me resolve this problem???