I have to create a search result box. Whenever a user type something in the search text box the list of result will be populated in the search result box just underneath the textbox. I am able to do this where there is only one instance of the search box(the caller is a single textbox). The problem occurs when the same searchbox is used for multiple text boxes. I want it to adjust its position according to the caller textbox. Here is the code:

```
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <style>
        .searchDiv {
            border: 1px solid red;
            width:150px;
            height:100px;
            visibility: hidden;
        }
    </style>
    <script>
        showSearchBox = function (_element) {
            var _div = document.getElementById('divSearch');
            _div.style.visibility = 'visible';
        }
        hideSearchBox = function () {           
            var _div = document.getElementById('divSearch');
            _div.style.visibility = 'hidden';
        }
    </script>
</head>
<body>
    <table border="0" style="width: 50%">
        <tbody>
            <tr>
                <td style="width: 50%">
                    <input type="text" id="txtFirstName" name="txtFirstName" onfocus="showSearchBox(this)" onblur="hideSearchBox()" />
                </td>
                <td style="width: 50%">
                    <input type="text" id="txtLastName" name="txtLastName" onfocus="showSearchBox(this)" onblur="hideSearchBox()"/>
                </td>
            </tr><tr>
                <td colspan="2" style="width: 100%">
                    This is just a placeholder text.
                </td>
            </tr>
            <tr>
                <td colspan="2" style="width: 100%">
                    <div id="divSearch" class="searchDiv"></div>
                </td>
            </tr>
        </tbody>
    </table>
</body>
</html>

```

What changes do I need to make in my code? You can also check out the [jsfiddle](http://jsfiddle.net/rms2L438/)