Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Combo box with same option value.

Posted on 2004-04-01
4
Medium Priority
?
130 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 33

Accepted Solution

by:
knightEknight earned 375 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

609 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