IE Error: Object doesn't support this property or method (when i use the select list)
<p>I have several onchange events happening in my form based off of the first select list. basically if you select card in the select you get a set of specific values populated in <strong>other</strong> select list in the form. Same thing happens when you select travel. these are the only 2 option on the select list that is throwing the error. the snippet of code below is the part that is causing the error. any ideas </p>

<p>Here is the html side of the form</p>

<pre><code> &lt;label class="formLabel" for="BusinessUnit" style="margin-top:18px; color:#666666;"&gt;*Business Unit&lt;/label &gt;&lt;select class="formInput" style="width:170px" name="Business_Unit" ID="Business_Unit" onChange='partnerRepCountry();partnerRepPosition();partnerRepRegion();annualAirTransactions();populatePartnerRepChannel();showBreezeOnly();'&gt;
        &lt;option value=""  selected&gt;-- Please Select --&lt;/option&gt;
        &lt;option value="Card" &gt;Card&lt;/option&gt;
        &lt;option value="Travel"&gt;Business Travel&lt;/option&gt;
    &lt;/select&gt;
</code></pre>

<p>the error message says it is on line 1435</p>

<pre><code>1429 var partnerRepChannel = document.forms[form].C_Partner_Rep_Channel1;
1430 var new_ubound = segmentArray.length;
1431 var old_ubound = partnerRepChannel.options.length;
1432 var z_ubound = old_ubound;
1433 for(oi=0; oi &lt; new_ubound; oi++){
1434    partnerRepChannel.options[oi] = segmentArray[oi];
1435 }
1436 for(zi = partnerRepChannel.options.length-1;zi&gt;=oi;zi--)
1437 {
1438     partnerRepChannel.options[zi]= null;
1439 }
1440   partnerRepChannel.options[0].selected=true;
1441
1442 }
</code></pre>

<p>this is the full function</p>

<pre><code>function populatePartnerRepChannel()
{

    var repSegment_BuCard_RepCountryUS = Array(new Option("-- Please Select --", '')
        , new Option("GCG Sales", "GCG Sales")
        , new Option("GCG AD", "GCG AD")
        , new Option("Large Managed AD", "Large Managed AD")
        , new Option("CAD", "CAD")
        , new Option("OBT", "OBT")
        , new Option("Business Travel", "Business Travel")
        , new Option("Enterprise", "Enterprise")
        , new Option("National Sales", "National Sales")
        , new Option("Regional Sales", "Regional Sales")
        , new Option("CAT", "CAT")
        );
    var repSegment_BuCard_RepCountryUK = Array(new Option("-- Please Select --", '')
        , new Option("GCG Sales", "GCG Sales")
        , new Option("Large Market", "Large Market")
        , new Option("National", "National")
        , new Option("RAM", "RAM")
        , new Option("CAD", "CAD")
        , new Option("Middle Market", "Middle Market")
        , new Option("CAT", "CAT")
        );
    var repSegment_BuCard_RepCountryArgentina = Array(new Option("-- Please Select --", '')
        , new Option("GCG", "GCG")
        , new Option("Large Market", "Large Market")
        , new Option("Middle Market", "Middle Market")
        , new Option("Direct / Remote", "Direct / Remote")
        , new Option("Other", "Other")
        );
    var repSegment_BuCard_RepCountryAustralia = Array(new Option("-- Please Select --", '')
        , new Option("GCG", "GCG")
        , new Option("Large Market", "Large Market")
        , new Option("Mid Market", "Mid Market")
        , new Option("CAD", "CAD")
        , new Option("OBT", "OBT")
        );
    var repSegment_BuCard_RepCountryCanada = Array(new Option("-- Please Select --", '')
        , new Option("GCG", "GCG")
        , new Option("Field Managed", "Field Managed")
        , new Option("VAM", "VAM")
        , new Option("Direct", "Direct")
        , new Option("Large Market", "Large Market")
        , new Option("Middle Market", "Middle Market")
        );
    var repSegment_BuCard_RepCountryGermany = Array(new Option("-- Please Select --", '')
        , new Option("GCG", "GCG")
        , new Option("Large Market", "Large Market")
        , new Option("National", "National")
        , new Option("RAM", "RAM")
        , new Option("CAD", "CAD")
        , new Option("Middle Market", "Middle Market")
        , new Option("CAT", "CAT")
        );
    var repSegment_BuCard_RepCountryFrance = Array(new Option("-- Please Select --", '')
        , new Option("GCG", "GCG")
        , new Option("Large Market", "Large Market")
        , new Option("National", "National")
        , new Option("RAM", "RAM")
        , new Option("CAD", "CAD")
        , new Option("Middle Market", "Middle Market")
        , new Option("CAT", "CAT")
        );
    var repSegment_BuCard_RepCountryMexico = Array(new Option("-- Please Select --", '')
        , new Option("GCG", "GCG")
        , new Option("Large Market", "Large Market")
        , new Option("Mid Market", "Mid Market")
        , new Option("VAM", "VAM")
        );
    var repSegment_BuCard_RepCountryJapan = Array(new Option("-- Please Select --", '')
        , new Option("GCG", "GCG")
        , new Option("Large Market", "Large Market")
        , new Option("Middle Market", "Middle Market")
        , new Option("Direct / Remote", "Direct / Remote")
        , new Option("Other", "Other")
        );
    var repSegment_BuCard_RepCountryNetherlands = Array(new Option("-- Please Select --", '')
        , new Option("GCG", "GCG")
        , new Option("Large Market", "Large Market")
        , new Option("Middle Market", "Middle Market")
        , new Option("Direct / Remote", "Direct / Remote")
        , new Option("Other", "Other")
        );
    var repSegment_BuCard_RepCountryHongKong = Array(new Option("-- Please Select --", '')
        , new Option("GCG", "GCG")
        , new Option("Large Market", "Large Market")
        , new Option("Mid Market", "Mid Market")
        , new Option("CAD", "CAD")
        , new Option("OBT", "OBT")
        );
    var repSegment_BuCard_RepCountryIndia = Array(new Option("-- Please Select --", '')
        , new Option("GCG", "GCG")
        , new Option("Large Market", "Large Market")
        , new Option("Mid Market", "Mid Market")
        , new Option("CAD", "CAD")
        , new Option("OBT", "OBT")
        );
    var repSegment_BuCard_RepCountryItaly = Array(new Option("-- Please Select --", '')
        , new Option("GCG", "GCG")
        , new Option("Large Market", "Large Market")
        , new Option("National", "National")
        , new Option("RAM", "RAM")
        , new Option("CAD", "CAD")
        , new Option("Middle Market", "Middle Market")
        , new Option("CAT", "CAT")
        );
    var repSegment_BuCard_RepCountrySpain = Array(new Option("-- Please Select --", '')
        , new Option("GCG", "GCG")
        , new Option("Large Market", "Large Market")
        , new Option("Middle Market", "Middle Market")
        , new Option("Direct / Remote", "Direct / Remote")
        , new Option("Other", "Other")
        );
    var repSegment_BuCard_RepCountrySingapore = Array(new Option("-- Please Select --", '')
        , new Option("GCG", "GCG")
        , new Option("Large Market", "Large Market")
        , new Option("Mid Market", "Mid Market")
        , new Option("CAD", "CAD")
        , new Option("OBT", "OBT")
        );


    var repSegment_BuTravel_RepRegionEMEA = Array(new Option("-- Please Select --", '')
        , new Option("Small Market", "Small Market")
        , new Option("Middle Market", "Middle Market")
        , new Option("Large Market", "Large Market")
        , new Option("Multinational Global Business Partnerships", "Multinational Global Business Partnerships")
        );
    var repSegment_BuTravel_RepRegionNA = Array(new Option("-- Please Select --", '')
        , new Option("Middle Market Direct", "Middle Market Direct")
        , new Option("Middle Market Select", "Middle Market Select")
        , new Option("Large Market", "Large Market")
        , new Option("Multinational", "Multinational")
        , new Option("Global Business Partnerships", "Global Business Partnerships")
        );
    var repSegment_BuTravel_RepRegionLAC = Array(new Option("-- Please Select --", '')
        , new Option("Small Market", "Small Market")
        , new Option("Middle Market", "Middle Market")
        , new Option("Large Market", "Large Market")
        , new Option("Global Business Partnerships", "Global Business Partnerships")
        );
    var repSegment_BuTravel_RepRegionJAPA = Array(new Option("-- Please Select --", '')
        , new Option("Middle Market", "Middle Market")
        , new Option("Large Market", "Large Market")
        , new Option("Global Business Partnerships", "Global Business Partnerships")
        );
    var repSegment_BuTravel_RepRegionWSSCE = Array(new Option("-- Please Select --", '')
        , new Option("Middle Market Direct", "Middle Market Direct")
        , new Option("Middle Market Select", "Middle Market Select")
        , new Option("Large Market", "Large Market")
        , new Option("Multinational", "Multinational")
        , new Option("Global Business Partnerships", "Global Business Partnerships")
        );
    if(document.forms[form].C_PartnerRepCountry.value == 'USA')
    {
        segmentArray = repSegment_BuCard_RepCountryUS;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'United Kingdom' &amp;&amp; document.forms[form].Business_Unit.value == 'Card')
    {
        segmentArray = repSegment_BuCard_RepCountryUK;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Argentina' &amp;&amp; document.forms[form].Business_Unit.value == 'Card')
    {
        segmentArray = repSegment_BuCard_RepCountryArgentina;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Australia' &amp;&amp; document.forms[form].Business_Unit.value == 'Card')
    {
        segmentArray = repSegment_BuCard_RepCountryAustralia;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Canada')
    {
        segmentArray = repSegment_BuCard_RepCountryCanada;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Germany' &amp;&amp; document.forms[form].Business_Unit.value == 'Card')
    {
        segmentArray = repSegment_BuCard_RepCountryGermany;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'France' &amp;&amp; document.forms[form].Business_Unit.value == 'Card')
    {
        segmentArray = repSegment_BuCard_RepCountryFrance;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Mexico' &amp;&amp; document.forms[form].Business_Unit.value == 'Card')
    {
        segmentArray = repSegment_BuCard_RepCountryMexico;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Japan' &amp;&amp; document.forms[form].Business_Unit.value == 'Card')
    {
        segmentArray = repSegment_BuCard_RepCountryJapan;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Netherlands' &amp;&amp; document.forms[form].Business_Unit.value == 'Card')
    {
        segmentArray = repSegment_BuCard_RepCountryNetherlands;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Hong Kong' &amp;&amp; document.forms[form].Business_Unit.value == 'Card')
    {
        segmentArray = repSegment_BuCard_RepCountryHongKong;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'India' &amp;&amp; document.forms[form].Business_Unit.value == 'Card')
    {
        segmentArray = repSegment_BuCard_RepCountryIndia;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Italy' &amp;&amp; document.forms[form].Business_Unit.value == 'Card')
    {
        segmentArray = repSegment_BuCard_RepCountryItaly;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Spain' &amp;&amp; document.forms[form].Business_Unit.value == 'Card')
    {
        segmentArray = repSegment_BuCard_RepCountrySpain;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Singapore' &amp;&amp; document.forms[form].Business_Unit.value == 'Card')
    {
        segmentArray = repSegment_BuCard_RepCountrySingapore;
    }

    if(document.forms[form].C_PartnerRepCountry.value == 'United Kingdom' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuCard_RepCountryUK;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Argentina' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuCard_RepCountryArgentina;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Australia' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuCard_RepCountryAustralia;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Germany' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuCard_RepCountryGermany;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'France' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuCard_RepCountryFrance;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Mexico' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuCard_RepCountryMexico;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Japan' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuCard_RepCountryJapan;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Netherlands' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuCard_RepCountryNetherlands;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Hong Kong' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuCard_RepCountryHongKong;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'India' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuCard_RepCountryIndia;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Italy' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuCard_RepCountryItaly;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Spain' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuCard_RepCountrySpain;
    }
    else if(document.forms[form].C_PartnerRepCountry.value == 'Singapore' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuCard_RepCountrySingapore;
    }

    if(document.forms[form].C_Partner_Rep_Region1.value == 'EMEA' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuTravel_RepRegionEMEA;
    }
    else if(document.forms[form].C_Partner_Rep_Region1.value == 'NA' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuTravel_RepRegionNA;
    }
    else if(document.forms[form].C_Partner_Rep_Region1.value == 'LAC' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuTravel_RepRegionLAC;
    }
    else if(document.forms[form].C_Partner_Rep_Region1.value == 'JAPA' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuTravel_RepRegionJAPA;
    }
    else if(document.forms[form].C_Partner_Rep_Region1.value == 'West' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuTravel_RepRegionWSSCE;
    }
    else if(document.forms[form].C_Partner_Rep_Region1.value == 'South' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuTravel_RepRegionWSSCE;
    }
    else if(document.forms[form].C_Partner_Rep_Region1.value == 'SouthEast' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuTravel_RepRegionWSSCE;
    }
    else if(document.forms[form].C_Partner_Rep_Region1.value == 'Central' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuTravel_RepRegionWSSCE;
    }
    else if(document.forms[form].C_Partner_Rep_Region1.value == 'East' &amp;&amp; document.forms[form].Business_Unit.value == 'Travel')
    {
        segmentArray = repSegment_BuTravel_RepRegionWSSCE;
    }

    var new_ubound = segmentArray.length;
    var old_ubound = partnerRepChannel.options.length;
    var z_ubound = old_ubound;
    for(oi=0; oi &lt; new_ubound; oi++){
        partnerRepChannel.options[oi] = segmentArray[oi];
    }
    for(zi = partnerRepChannel.options.length-1;zi&gt;=oi;zi--)
    {
        partnerRepChannel.options[zi]= null;
    }
    partnerRepChannel.options[0].selected=true;

}
</code></pre>
