I am writing javascript that splits an array based on delimiter(,) and puts that value to text box. Each array contains exact five comma separated values. I tried the below code and getting error

"Error: Object doesn't support this property or method".


Please anyone help me in fixing this issue.

Code:
<script>

function show() {
        var mycars = new Array();
        mycars[0] = "768,232,574,768.234";
        mycars[1]  = "abc, def, ghi, jkl,mno";

        for(var i=0; i<mycars[i].length; i++){
            mycars= mycars.split(",");

            document.getElementById('name')[0].value=mycars;
        }

    }
</script>
<form>
    <table class="cmn-table" id="t1" border="1"
        style="margin-left: 0.2em; margin-right: 0em">
        <tr>
            <th>Sl.No</th>
            <th>Source IP Address</th>
            <th>Destination IP Address</th>
            <th>Service and Port (TCP, UDP, etc.)</th>
            <th>Start Date</th>
            <th>Expiration Date</th>
        </tr>
        <tr>
            <td><input type="text" name="name11" id="s1" value="1" size="2"
                readonly="readonly" /></td>

            <td><input type="text" name="name0" id="name" size="20">
            </td>
            <td><input type="text" name="name1" id="name1" size="20">
            </td>
            <td><input type="text" name="name2" id="name2" size="20">
            </td>
            <td><input type="text" name="name3" id="name3" size="15">
            </td>
            <td><input type="text" name="name4" id="name4" size="15">
            </td>
        </tr>
        <tr>
            <td><input type="text" name="name0" id="s2" size="2" value="2"
                readonly="readonly" /></td>
            <td><input type="text" name="name" id="name5" size="20">
            </td>
            <td><input type="text" name="name1" id="name6" size="20">
            </td>
            <td><input type="text" name="name2" id="name7" size="20">
            </td>
            <td><input type="text" name="name3" id="name8" size="15">
            </td>
            <td><input type="text" name="name4" id="name9" size="15">
            </td>
        </tr>
    </table>

</form>
<input type="button" value="Click" onclick="show()">