Getting values from label, hiddenfield in javascript for IE, Firefox

Filed in .Net | Javascript Leave a comment

var tot;

//Get cialis super active controls as below

var subTotals = document.getElementById(‘<%= lblSubTotals.ClientID %>’);

var promocodetype = document.getElementById(‘<%= hdnPromoCodeType.ClientID %>’);

if (document.all) {//IE

var pc = promocodetype.value;

tot = subTotals.innerText;

}

else{//Fire Fox

tot = subTotals.textContent;

}

TOP