I have 4 text boxes and I need to fill with auto complete. I have created the jsfiddle but not able to get it run as I am submitting to the server to get the data. When i click add button I am able to add to only first line of input boxes but never be able to add to others such as 2, 3 and 4. Could someone take a look? Thanks!

<http://jsfiddle.net/qF5jU/2/>

```
        $('[name=addAgent]').bind('click', function() {

            var agent = $('[name=selectAgent]').val();
            var agentID =$("#AgentID").val();
            //alert(agent);

            if(agent == ""){
            $.msgBox({
                title:"Agent Name",
                content:"Please search for an agent to Add!"
                });
            return false;
            }

            if($('#container').find('text').length < 4) {
            alert($('#container').find('text').length);             
           $('#Agent1').val(agent);
           $('#AgentID1').val(agentID);
            $( '[name=selectAgent]' ).val('');      
            }else{
                $.msgBox({
                title:"Agent Name",
                content:"You cannot add more than 4 Agents!"
                });
            }
        })

```