tags:

views:

21

answers:

1
function hideShowTextBox(tabName, index, tabContainer) {
  var tabIndex = index + 1;
  var dropDownId = tabContainer + '_' + tabName + '_IncomeDetails' + tabIndex + '_dpEmploymentStatus';

  //this line gives a blank value..What may be the problem???
  alert($(dropDownId + ' option:selected').text()); 
}
+2  A: 

ID selectors must begin with the # character, e.g.#foo. Try:

var dropDownId = '#' + tabContainer + '_' + tabName + '_IncomeDetails' + tabIndex + '_dpEmploymentStatus';
karim79