The Javascript Function works Great on IE but it does not work on CHROME


The Javascript Function works Great on IE but it does not work on CHROMEThe Javascript Function works Great on IE but it does not work on CHROME

<HTML>
<Head>
<script>

     function mediaSave() {
        // A media must have all three fields
        if (document.caseForm.mediaTypeOid.options.value.length == 0 ||
    //              document.caseForm.mediaVolume.value.length == 0 ||
                document.caseForm.mediaNumberOfCopies.value.length == 0) {
    //          alert("If you enter a media, the media type, volume and 
     number are required.");
            alert("If you enter a media, the media type and number are 
      required.");
            return;
        }
        // Volume must be numeric. If the units is kbs, then the volume must 
      be integer.
        if (mediaUnits(document.caseForm.mediaTypeOid.selectedIndex-1) == 
     "kbs") {
            if ( ! isNumeric(document.caseForm.mediaVolume.value)) {
                alert("The volume must be a number.");
                return;
            }
        } else {
            if ( ! isInteger(document.caseForm.mediaVolume.value)) {
                alert("The volume must be an integer.");
                return;
            }
        }
        
        // Number of copies must be an integer.
            if ( ! isInteger(document.caseForm.mediaNumberOfCopies.value)) {
                alert("The number of copies must be a positive integer.");
                return;
            }
    
        if (mediaEditing == -1) {
            mediaEditing=medias.getRowCount();
            medias.addRows(1);
            medias.setField(mediaEditing, "record_status", "add");
        } else {
            record_status=medias.getField(mediaEditing, "record_status");
            if (record_status == "" || isNull(record_status)) {
                medias.setField(mediaEditing, "record_status", "update");
            }
        }
        media_type_oid=document.caseForm.mediaTypeOid.options(document.caseForm.mediaTypeOid.selectedIndex).value;
        medias.setField(mediaEditing, "media_type_oid", media_type_oid);
        if (media_type_oid == "") {
            media_type="";
        } else {
    media_type=document.caseForm.mediaTypeOid.options(document.caseForm.mediaTyp 
     eOid.selectedIndex).text;
        }
        medias.setField(mediaEditing, "media_type", media_type);
        medias.setField(mediaEditing, "volume", document.caseForm.mediaVolume.value);
        medias.setField(mediaEditing, "units", mediaUnits(document.caseForm.mediaTypeOid.selectedIndex-1));
        medias.setField(mediaEditing, "number_of_copies", document.caseForm.mediaNumberOfCopies.value);
        mediaEditing=-1;
        mediaClearAdd();`//THis is another function which clears the ADD button`
        displayMedia();//This functio displays the button
        mediaAddButtonShow(); //This Function displays the Add Button
    }
});
</script>
</Head>
<table border="0" cellpadding="0" cellspacing="0" class="tintgray2">
    <cfif isEditable>
        <tr class="tintgray2">
            <td colspan="3" align="left">
                <span class="small">
                    &nbsp;&nbsp;* All fields below are required upon submit<br />
                    &nbsp;&nbsp;At least 1 media type is required to submit
                </span>
            </td>
            <td colspan="3" align="left">&nbsp;</td>
        </tr>
    </cfif>
    
    <tr class="tintgray2">
        <td colspan="6" align="center">

            <table width="650" border="0" align="center" cellpadding="0" cellspacing="0" class="boxGray">
                <caption>Media List</caption>
                <tr>
                    <td colspan="4" class="subtbltitle2">MEDIA</td>
                </tr>
                
                <tr>
                    <th id="t1" width="150px" align="left" class="sub" scope="col">Medium</th>
                    <th id="t2" width="200px" align="center" class="sub" scope="col">Volume</th>
                    <th id="t3" width="150px" align="center" class="sub" scope="col"># of Copies</th>
                    <cfif isEditable><th id="t4" width="150px" align="center" class="sub" scope="col">Actions</th></cfif>
                </tr>
                <tr>
                    <td colspan="4">
                        <div id="mediaRowsBefore">
                        </div>
                    </td>
                </tr>
                <cfif isEditable>
                    <cfoutput>
                    <!--- WARNING:  IF YOU CHANGE THE FOLLOWING WIDTHS, YOU NEED TO CHANGE THEM IN THE JAVASCRIPT ABOVE AND IN THE HTML TABLE BELOW!!! --->
                    <tr>
                        <td width="150px" id="addedit" class="tblrowadd" align="left" scope="row">#mediaTypeOid.inputTxt#</td>
                        <td width="200px" id="addedit" class="tblrowadd" align="center" scope="row">#mediaVolume.inputTxt#&nbsp;<span id="mediaUnitsDisplay">#mediaUnits.inputTxt#</span></td>
                        <td width="150px" id="addedit" class="tblrowadd" align="center" scope="row">#mediaNumberOfCopies.inputTxt#</td>
                        <td width="150px" id="addedit" class="tblrowadd" align="left" scope="row"><span id="mediaAddButton" style="display: inline;"><cfif isEditable><a href="##"  onClick="mediaSave();"><img src="https://codereview.stackexchange.com/#Application.fusebox.images#Button_Add.jpg" alt="Add" title="Add" width="58" height="18" border="0" onmouseover="this.style.cursor='hand';"/></a></cfif></span><span id="mediaSaveButton" style="display: none;"><cfif isEditable><a href="##" onClick="mediaSave();"><img src="#Application.fusebox.images#Button_OK.jpg" alt="Save" title="Save" border="0" onmouseover="this.style.cursor='hand';"/></a></cfif></span>&nbsp;<span id="mediaSaveButton" style="display: none;"><cfif isEditable><a href="##"  onClick="mediaCancel();" ><img src="#Application.fusebox.images#Button_Cancel.jpg" alt="Cancel" title="Cancel" width="58" height="18" border="0" onmouseover="this.style.cursor='hand';"/></a></cfif></span></td>
                    </tr>
                    </cfoutput>
                </cfif>
                <tr>
                    <td colspan="4">
                        <div id="mediaRowsAfter">
                            <table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
                                <cfoutput query="medias">
                                    <cfif medias.record_status neq "delete" and medias.record_status neq "adddelete">
                                        <cfset classInfo="tblrowsub">
                                        <cfif currentRow mod 2>
                                            <cfset classInfo="tblrow">
                                        </cfif>
                                        <!---<cfset TIEdit   = 107+ medias.currentRow>
                                        <cfset TIDelete = 108+ medias.currentRow>--->
                                        <cfif len(trim(errMsg)) and isDefined("errStruct.medias") and errStruct.medias(medias.currentRow)>
                                            <cfset classInfo="errfield">
                                        </cfif>
                                        <tr>
                                            <td width="150px" class="#classInfo#" align="left" scope="row"> &nbsp;#media_type#</td>
                                            <td width="200px" class="#classInfo#" align="center" scope="row">#volume# #units#</td>
                                            <td width="150px" class="#classInfo#" align="center" scope="row">#number_of_copies#</td>
                                            <cfif isEditable><td width="150px" class="#classInfo#" align="left"><a href="##" onClick="mediaEdit(#medias.currentRow#-1);" ><img src="#Application.fusebox.images#Button_Edit.jpg" alt="Edit" title="Edit" width="58" height="18" border="0" onmouseover="this.style.cursor='hand';"id="medEditBtn" name="medEditBtn"/></a>&nbsp;<a href="##" onClick="mediaDelete(#medias.currentRow#-1);"><img src="#Application.fusebox.images#Button_Delete.jpg" alt="Cancel" title="Cancel" width="58" height="18" border="0" onmouseover="this.style.cursor='hand';" id="medDeleteBtn" name="medDeleteBtn"/></a></td></cfif>
                                        </tr>
                                    </cfif>
                                </cfoutput>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
</HTML>