/* student.js Author: Date: */ $(document).ready(function(){ // begin document.ready block /* your javascript and jquery code here */ $('.menu').change(function(){ var selectedVal = $('.menu option:selected').val(); console.log('You chose ' + selectedVal); if (selectedVal == 'one'){ $('.company').html(''); var len = one.length; for (var i=0; i' + one[i].Company + ''); $('.company').change(function(){ var selectedCompany = $('.company option:selected').val(); console.log('You chose ' + selectedCompany) $('.results').html('

Certified:' + one[selectedCompany].Certified + '

' + '

Certified-Withdrawn:' + one[selectedCompany].CertifiedWithdrawn + '

' + '

Withdrawn:' + one[selectedCompany].Withdrawn + '

' + '

Denied:' + one[selectedCompany].Denied + '

' + '

Grand Total:' + one[selectedCompany].GrandTotal + '

'); }); } } if (selectedVal == 'two'){ $('.company').html(''); var len = two.length; for (var i=0; i' + two[i].Company + ''); $('.company').change(function(){ var selectedCompany = $('.company option:selected').val(); console.log('You chose ' + selectedCompany) $('.results').html('

Certified:' + two[selectedCompany].Certified + '

' + '

Certified-Withdrawn:' + two[selectedCompany].CertifiedWithdrawn + '

' + '

Withdrawn:' + two[selectedCompany].Withdrawn + '

' + '

Denied:' + two[selectedCompany].Denied + '

' + '

Grand Total:' + two[selectedCompany].GrandTotal + '

'); }); } } if (selectedVal == 'three'){ $('.company').html(''); var len = three.length; for (var i=0; i' + three[i].Company + ''); $('.company').change(function(){ var selectedCompany = $('.company option:selected').val(); console.log('You chose ' + selectedCompany) $('.results').html('

Certified:' + three[selectedCompany].Certified + '

' + '

Certified-Withdrawn:' + three[selectedCompany].CertifiedWithdrawn + '

' + '

Withdrawn:' + three[selectedCompany].Withdrawn + '

' + '

Denied:' + three[selectedCompany].Denied + '

' + '

Grand Total:' + three[selectedCompany].GrandTotal + '

'); }); } } }); }); //end document.ready block