• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 131
  • Last Modified:

Combo box with same option value.

Hi,

I am using a combo box in which two or more than two items are having same value.

<Select name="cmb" >
<option value="">
<option value="A">A
<option value="B">B
<option value="C">C
<option value="A">A
</select>


When I select the last A (option 4), the combo automatically selects first A(option 2). When I select the last A second time then it correctly selects the last A(option 4).

Can any body tell the reason for this problem.
0
Rinkesh
Asked:
Rinkesh
1 Solution
 
knightEknightCommented:
what browser are you using?  it works correctly for me.  I even added additional duplicate options, no problems:


<html>
<body>

<form name="myform">
 <select name="cmb" >
  <option value="">
  <option value="A">A
  <option value="B">B
  <option value="C">C
  <option value="A">A
  <option value="B">B
  <option value="C">C
 </select>
</form>

</body>
</html>
0
 
bvinsonCommented:
Works correctly for me too...may we ask why you want to differentiate between two items with the same value?

Maybe there is another, more reliable way to accomplish what you are attempting.

bvinson
0
 
JGCoughlinCommented:
Are you activating the combo box and then typing the letter 'A'?  That would give you the effect you are experiencing...I agree with bvinson, let us know your ultimate goal and we can help more.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now