@snapey very sorry for these much days delay.
Just now i tried , first i cant alert the variable returned from controller
just i tried this
alert({{$education_details_edit->education}}); even this shows error.
i unable to predict where to check it.
this is my js
var educationobject = {
"SSLC" : {
"CBSE": ["English Medium", "Tamil Medium", "Other"],
"CISCE(ICSE/ISC)": ["English Medium", "Tamil Medium", "Other"],
"Matriculation": ["English Medium", "Tamil Medium", "Other"],
"State Board": ["English Medium", "Tamil Medium", "Other"],
"Other": ["Other"],
},
"Other" : {
"Other": ["Other"],
},
actually i have three drop downs.
1st drop down posess SSLC and Other
if SSLC is selected then next dropdown changes to
CBSE,CISCE(ICSE/ISC),Matriculation,State Board these options will be displayed
then if CBSE is selected then the third dropdown changes English Medium, Tamil Medium, Other
this is the loop for that..
window.onload = function () {
var education = document.getElementById("education"),
course_or_board = document.getElementById("course_or_board"),
specialization_or_medium = document.getElementById("specialization_or_medium");
for (var edu in educationobject) {
education.options[education.options.length] = new Option(edu, edu);
}
education.onchange = function () {
course_or_board.length = 1; // remove all options bar first
specialization_or_medium.length = 1; // remove all options bar first
if (this.selectedIndex < 1) return; // done
for (var course in educationobject[this.value]) {
course_or_board.options[course_or_board.options.length] = new Option(course, course);
}
}
education.onchange(); // reset in case page is reloaded
course_or_board.onchange = function () {
specialization_or_medium.length = 1; // remove all options bar first
if (this.selectedIndex < 1) return; // done
var special = educationobject[education.value][this.value];
for (var i = 0; i < special.length; i++) {
specialization_or_medium.options[specialization_or_medium.options.length] = new Option(special[i], special[i]);
}
}
}
education = my first dropdown name
course_or_board= my second dropdown name
specialization_or_medium= my third drop down name
here where can i check the condition which is returned from the controller.
Kindly help mee...
and the below mentioned are data returned from controller. which i need to check with the three drop downs.
{{$education_details_edit->education}} = my controller return which contains education column data
{{$education_details_edit->course_or_board}} = my controller return which contains course_or_board column data
{{$education_details_edit->specialization_or_medium}} = my controller return which contains specialization_or_medium column data