I have to call different JavaScript files depending on the users choice from a dropdown menu.
I tried to do it like this:
if ($subject == "Chemistry") {
'<script src="ChartJS_Chemistry></script>';
}
But that doesn't seem to work.
Any advice on how to activate the right file depending on the dropdown menu choice?
echo?