// JavaScript function ChangeTextBox(textbox) { var prefix = textbox.id.substring(0,textbox.id.lastIndexOf("_") + 1); var ProductList = document.getElementById(prefix + 'HiddenProduct').value.split(";;"); var selected; //MBT Phase2-Release1-LUW1 //Begin:Kunal April-2014 //Product selection is not working for Non-IE Browser if (navigator.appVersion.indexOf("MSIE") != -1) { for(var i = 0; i < document.getElementById(prefix + 'rbgProduct').childNodes[0].childNodes.length; i++) { if(document.getElementById(prefix + 'rbgProduct_' + i).checked == true) { textbox.value = ProductList[i]; selected = i; } } } else { for(var i = 0; i < ProductList.length-1; i++) { if(document.getElementById(prefix + 'rbgProduct_' + i).checked == true) { $(textbox)[0].textContent = ProductList[i]; $(textbox)[0].innerText = ProductList[i]; $(textbox)[0].value = ProductList[i]; selected = i; } } }
// Server Side public override void RenderControl(HtmlTextWriter writer) { rbgProduct.Attributes.Add("onclick", "ChangeTextBox(" + txtProductDescription.ClientID + ")"); txtProductDescription.Attributes.Add("readonly", "readonly"); base.RenderControl(writer); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)