Following is my code which works fine in firefox but not in chrome. Kindly let me know how to solve this issue. The main idea is to call a js function based on the selected
A different approach would be add an event listener to the and not the options.
var e = document.getElementById("qtype");
var selectedSelect= e.options[e.selectedIndex].value;
the above code will find the select element and call it e. Then find the value selected and call it selectedSelect. Then you can simply pass this value into the question_type() function.