Click here to Skip to main content
16,021,172 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
XML
<script type = "text/javascript">
    //Script para incluir en el ComboBox1 cada item chekeado del chkListMateriales
    function CheckItem(checkBoxList) {


        var options = checkBoxList.getElementsByTagName('input');
        var arrayOfCheckBoxLabels = checkBoxList.getElementsByTagName('label');
        var s = "";

        for (i = 0; i < options.length; i++) {
            var opt = options[i];

            if (opt.checked) {

                s = s + ", '" + arrayOfCheckBoxLabels[i].innerText.replace("'", "''") + "'";

            }
        }
        if (s.length > 0) {
            s = s.substring(2, s.length); //sacar la primer 'coma'
        }

        var TxtBox = document.getElementById("<%=txtCombo.ClientID%>");
        TxtBox.value = s;
        document.getElementById('<%=hidVal.ClientID %>').value = s;
    }
</script>
Posted
Comments
Kuthuparakkal 6-Sep-12 1:41am    
need more info, wot's yr question
prashant patil 4987 6-Sep-12 1:44am    
hey please explain your question?

1 solution

If you meant ClientID: If hidden filed is on server side you neeed to get client id of the filed to get the value in your javascript
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900