Putting A Variable Into Name Of Function Javascript
I want to do the following: var table = new google.visualization.XXXXX(document.getElementById(divId)); where the X's represent a variable that is set previously. Just so you know
Solution 1:
Use square bracket notation.
varXXXXX = "someString";
var table = new google.visualization[XXXXX](document.getElementById(divId));
Post a Comment for "Putting A Variable Into Name Of Function Javascript"