"A" should be passed as a string. Without the quotes it looks for A as an object.
-> setAttrib('onchange','validateDataType("'.$customerAttributes[$i]['data_type'].'")')
You will need to change onchange="validateDataType(A)"
to single quotes... onchange='validateDataType("A")'