Same way it is done for the other <select>s.
Look at them:
Code:
var inunittext = inunit.options[inunit.selectedIndex].text;
var outunittext = outunit.options[outunit.selectedIndex].text;
var densunittext = densunit.options[densunit.selectedIndex].text;
So
Code:
var substance = document.getElementById("substance");
var substanceAsText = substance.options[substance.selectedIndex].text;
I used
substanceAsText because you already have a variable named
substanceText used for another purpose.