why not simply
Code:
<html>
<head>
<body>
<select id="ListBox" Width="60px" size="5">
<option value="1">Item #1</option>
<option value="2">Item Long Item #2</option>
<option value="3">Very Long Item #3</option>
<option value="4">Very Long Long Item #4</option>
<option value="5">Item #5</option>
<option value="6">Item #6</option>
<option value="7">Item #7</option>
</select>
<script type="text/javascript">
opts=document.getElementById("ListBox").getElementsByTagName("option")
for (var k=0; k<opts.length; k++) {
opts[k].title=opts[k].text
}
</script>
</body>
</html>
or am I misunderstanding the question?
Bookmarks