So i am trying to get a value of a field using jquery and a variable but for some reason I can't get it to work:
var col = field1;
var val = $('select[name='+col+']').val();
For some reason this code is not working and I am not sure why. But when I remove the variable it works fine.
var val = $('select[name=field1]').val();
This works fine. How do i pass a variable value into this equation? Thank you for any help.