ajax-chosen icon indicating copy to clipboard operation
ajax-chosen copied to clipboard

changed existing selected_values check to use value instead of value/label

Open clarkewd opened this issue 11 years ago • 0 comments

I don't see a reason to use the label instead of the value:

selected_values.push($(this).val() + "-" + $(this).text());

Why not just use:

selected_values.push($(this).val())

I was having trouble with returned JSON and encoded HTML entities not matching the label that was pulled from the page using .text() - sure it is possible to also use .html() but why not forget about the labels and check for duplicates / existing based on the selected value and not the label? the part of the code that was changed is not used when displaying the dropdown, etc.

clarkewd avatar Mar 20 '13 16:03 clarkewd