I’m trying to change the second select statement by what is selected in the first.
This is the code that I have currently, and it’s not working:
function getSchedText() {
var schedGrab = $("#schedGrab").text();
if (schedGrab == "English") {
$("#schedPost").load('../start/english.html');
}
else if (schedGrab == "Spanish") {
$("#schedPost").load('../start/spanish.html');
}
else if (schedGrab == "") {
$("#schedPost").load();
}
else {
$("#schedPost").load('../start/testdoc.html');
}
}
This is the according HTML:
<select name="class1" class="login" id="schedGrab" onclick="getSchedText()">php include</select>
<select name="class2" class="login" id="schedPost"></select>
you can do like below