JavaScript working in IE but not in Firefox
<pre><code>function onLoadMoneyEarned(size){
    for(var i=1;i&lt;=size;i++){
        var countStr1 = 'howOften__JB1_'+i;
        var countStr2 = 'howOften__JB2_'+i;
        var countStr3 = 'howOften__JB3_'+i;
        var countStr4 = 'howOften__JB4_'+i;

        var hrsPerWeek1 = 'hrsPerWeek__JB1_'+i
        var hrsPerWeek2 = 'hrsPerWeek__JB2_'+i
        var hrsPerWeek3 = 'hrsPerWeek__JB3_'+i
        var hrsPerWeek4 = 'hrsPerWeek__JB4_'+i

        var dropDownValue1 = document.getElementById(countStr1).value;
        var dropDownValue2 = document.getElementById(countStr2).value;
        var dropDownValue3 = document.getElementById(countStr3).value;
        var dropDownValue4 = document.getElementById(countStr4).value;

        var textbox1 = document.getElementById(hrsPerWeek1);
        textbox1.disabled = true;
        var textbox2 = document.getElementById(hrsPerWeek2);
        textbox2.disabled = true;
        var textbox3 = document.getElementById(hrsPerWeek3);
        textbox3.disabled = true;
        var textbox4 = document.getElementById(hrsPerWeek4);
        textbox4.disabled = true;

        if(dropDownValue1=="HR"){
            textbox1.disabled = false;
        }
        if(dropDownValue2=="HR"){
            textbox2.disabled = false;
        }
        if(dropDownValue3=="HR"){
            textbox3.disabled = false;
        }
        if(dropDownValue4=="HR"){
            textbox4.disabled = false;
        }
    }
</code></pre>

<p>This is the one working in IE..</p>

<p>I am calling the script like this </p>

<pre><code>&lt;script  language="javascript" type="text/javascript"&gt;
$(window).load(function(){onLoadMoneyEarned("&lt;%=nameLength%&gt;");});
&lt;/script&gt;
</code></pre>

<p>The main function of this script to enable the number of hours text field only if we select hourly in the dropdown beside it..But it is throwing validation errors in Firefox</p>

<p>Any Help appreciated</p>
