Solved

Combo box with same option value.

Posted on 2004-04-01
4
126 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 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adding 1 the value of input "text" every 3 seconds 5 48
Table doesn't show the lines! 3 36
title attribute 5 33
Undefined variable with $_POST in PHP 5 38
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

734 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