Solved

Combo box with same option value.

Posted on 2004-04-01
4
122 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now