var e = document.getElementsByClassName("chartBlock")[0]; var strUser = e.options[e.selectedIndex].value; var visualization = new google.visualization.LineChart(strUser);