javascript SWITCH statement not triggering
<p>I have a <code>switch</code> statement in my javascript on an ASP.NET C# web application. I am debugging it with FireBug and it is erroring out: as soon as it reaches the <code>switch</code> it exists it immediately.</p>

<p>Here is the code:</p>

<pre><code>$(function() {

    $('#received_dateTextbox').mask("99/99/99");
    $('#report_dateTextBox').mask("99/99/99");
    $('#occurrence_dateTextBox').mask("99/99/99");

    //var checkValues='';

    $('table input:checkbox').click(function() {

        if ($(this).prop('checked')) {
            var checkText = $(this).next('a').text();
            var hrefValue = $(this).next('a').attr('href');
            var trimIndex = hrefValue.lastIndexOf('\\') + 1;
            var checkValue =  hrefValue.substr(trimIndex, hrefValue.indexOf("')",trimIndex)-trimIndex);

            //checkValues+=checkValue+";";

            switch(checkValue)
            {
                //preanalytical other
                case "21": 
                    var userInput = prompt("Other:", "Other:");
                    $(this).next('a').html('Other:' + '&lt;font color="red"&gt;' + userInput + '&lt;/font&gt;');
                    checkValues+=checkValue+":"+userInput;
                break;

                //analytical other
                case "53": 
                    var userInput = prompt("Other:", "Other:");
                    $(this).next('a').html('Other:' + '&lt;font color="red"&gt;' + userInput + '&lt;/font&gt;');
                    checkValues+=checkValue+":"+userInput;
                break;

                //postanalytical other
                case "89": 
                    var userInput = prompt("Other:", "Other:");
                    $(this).next('a').html('Other:' + '&lt;font color="red"&gt;' + userInput + '&lt;/font&gt;');
                    checkValues+=checkValue+":"+userInput;
                break;

                //other other
                case "95": 
                    var userInput = prompt("Other:", "Other:");
                    $(this).next('a').html('Other:' + '&lt;font color="red"&gt;' + userInput + '&lt;/font&gt;');
                    checkValues+=checkValue+":"+userInput;
                break;

                //analytical liquid handler instrument failure
                case "40":
                    var userInput = prompt("Liquid Handler#:", "Liquid Handler#:");
                    $(this).next('a').html('Liquid Handler#:' + '&lt;font color="red"&gt;' + userInput + '&lt;/font&gt;');
                    checkValues+=checkValue+":"+userInput;
                break;

                //analytical olympus instrument failure
                case "41":                   
                    var userInput = prompt("Olympus#:", "Olympus#:");
                    $(this).next('a').html('Olympus#:' + '&lt;font color="red"&gt;' + userInput + '&lt;/font&gt;');
                    checkValues+=checkValue+":"+userInput;
                break;

                //analytical lcms instrument failure
                case "42":
                    var userInput = prompt("LC-MS/MS#:", "LC-MS/MS#:");
                    $(this).next('a').html('LC-MS/MS#:' + '&lt;font color="red"&gt;' + userInput + '&lt;/font&gt;');
                    checkValues+=checkValue+":"+userInput;
                break;

                //analytical liquid handler delay prod
                case "49":
                    var userInput = prompt("Liquid Handler#:", "Liquid Handler#:");
                    $(this).next('a').html('Liquid Handler#:' + '&lt;font color="red"&gt;' + userInput + '&lt;/font&gt;');
                    checkValues+=checkValue+":"+userInput;
                break;

                //analytical olympus delay prod
                case "50":
                     var userInput = prompt("Olympus#:", "Olympus#:");
                    $(this).next('a').html('Olympus#:' + '&lt;font color="red"&gt;' + userInput + '&lt;/font&gt;');
                    checkValues+=checkValue+":"+userInput;
                break;

                //analytical lcms delay prod
                case "51":
                    var userInput = prompt("LC-MS/MS#:", "LC-MS/MS#:");
                    $(this).next('a').html('LC-MS/MS#:' + '&lt;font color="red"&gt;' + userInput + '&lt;/font&gt;');
                    checkValues+=checkValue+":"+userInput;
                break;

                //wrong practice code
                case "63":
                    if (confirm("Do you want to check Report Sent to Wrong Location/Physician?"))
                    { var elNode = document.getElementById("TreeView1n82CheckBox");
                        $(elNode).prop("checked", true);
                     }
                    else
                    { var elNode = document.getElementById("TreeView1n81CheckBox");
                        $(elNode).prop("checked", false);
                    }

                break;  

                default: 
                    alert('no match');                
            }
        }
    });
    //document.getElementById('HiddenField1').value = checkValues;
});
</code></pre>

<p>The debugger showed me that <code>checkValue</code> definitely has a value</p>

<p>What am i doing wrong?</p>
