I have a code like this:

```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Eg - Textbox Dropdown</title>
</head>
<body>
<input name="TextboxExample" type="text" maxlength="50" id="TextboxExample" tabindex="2"
onchange="DropDownIndexClear('DropDownExTextboxExample');" style="width: 242px;
position: absolute; top: 0px; left: 0px; z-index: 2;" />
<select name="DropDownExTextboxExample" id="DropDownExTextboxExample" tabindex="1000"
onchange="DropDownTextToBox(this,'TextboxExample');" style="position: absolute;
top: 0px; left: 0px; z-index: 1; width: 265px;">
<option value="Value for Item 1" title="Title for Item 1">Item 1</option>
<option value="Value for Item 2" title="Title for Item 2">Item 2</option>
<option value="Value for Item 3" title="Title for Item 3">Item 3</option>
</select>
<script language="javascript" type="text/javascript">
//Since the first <option> will be preselected the IndexClear function must fire once to clear that out.
DropDownIndexClear("DropDownExTextboxExample");
</script>
</div>
</body>
</html>
<script type="text/javascript">
function DropDownTextToBox(objDropdown, strTextboxId) {
document.getElementById(strTextboxId).value += objDropdown.options[objDropdown.selectedIndex].value.concat(',');
DropDownIndexClear(objDropdown.id);
document.getElementById(strTextboxId).focus();
}
function DropDownIndexClear(strDropdownId) {
if (document.getElementById(strDropdownId) != null) {
//document.getElementById(strDropdownId).selectedIndex = -1;
var x=document.getElementById("DropDownExTextboxExample");
x.remove(x.selectedIndex);
}
}
</script>

```

The code works fine, but I need to avoid the same record to get selected again and again.

For example: if I select Item 1 from dropdown it should not be selected again. Now in this case, I can select Item 1 for 'n' number of times.

I need a help here.