Solved

Combo box with same option value.

Posted on 2004-04-01
4
125 Views
Last Modified: 2010-04-09
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
Comment
Question by:Rinkesh
4 Comments
 
LVL 33

Accepted Solution

by:
knightEknight earned 125 total points
ID: 10734527
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
 
LVL 6

Expert Comment

by:bvinson
ID: 10750891
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
 
LVL 1

Expert Comment

by:JGCoughlin
ID: 10782796
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

Independent Software Vendors: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question