Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript how to dynamically hide or reveal tables rows as needed Reply To: how to dynamically hide or reveal tables rows as needed

#169342
PirateStef
Participant
if(document.getElementById('Subjects').options[document.getElementById('Subjects').selectedIndex].value == "Web App Development Enquiry") {
  document.getElementById("website").style.display="none";
  document.getElementById("website").style.display="none";
}
else {
  document.getElementById("website").style.display="inline";
}

for multiples you could just add multiples.

for multiple “either” “or” statements you can use “&&” or “||”
info here: http://www.grauw.nl/blog/entry/510

the if part could be:
if(document.getElementById('Subjects').options[document.getElementById('Subjects').selectedIndex].value == "Web App Development Enquiry" && document.getElementById('Subjects').options[document.getElementById('Header').selectedIndex].value == "Web App Development Enquiry" )