0

Remove a dropdown value that has been selected from another dropdown menu

same above question but not use any value attribute in the option tag

sanjeev
  • 1
  • 3
  • Why would your options not have value? That doesn’t make much sense to me. – Terry Dec 24 '19 at 17:13
  • because my list has so many options, so instead of using value attribute for each option I am using name attribute in the select tag – sanjeev Dec 24 '19 at 17:17
  • I think instead of capturing values we have to capture text which is selected??? ...help me – sanjeev Dec 24 '19 at 17:27
  • But without any values no matter what option you select the `select` element will have no value. – Terry Dec 24 '19 at 17:53

1 Answers1

0
  1. Put an onclick handler on each of the options.
  2. Have the onclick handler get the html of the element e.g. $(el).html()
  3. Loop thru the options of the other select menu.
  4. Hide the one that has the same .html()
Nathan Hawks
  • 557
  • 4
  • 14