IT shows in the list box right Nancy Skosana but when inspect it shows “Nancy” skosana
Most probably it is due to this function can you see what is wrong
<input type=button class="master" name=b1 id=b1 value='Move >'>
function
$("#b1").click(function(){
$("#master option:selected").each(function() {
$("#purchases").append("<option value=" + $(this).val() +">"+$(this).text()+"</option>");
$("#master option[value= '"+ $(this).val() + "' ]").remove();
});
$('#purchases option').prop('selected', true);
});
Sorry, can’t help you with that, there’s no PHP in there and my JavaScript / jquery is almost non-existent. At a guess, since the display string is correct, maybe you could do something like:
$("#purchases").append("<option>"+$(this).text()+"</option>");
because you don’t need to specify the value if it’s the same as the text.
It will, because you have that between the open and close <option>
tags. But the value
is different, it only has the first name in there.
This did the trick
$("#purchases").append("<option>"+$(this).text()+"</option>");
Thank you very much by giving up your time I spend days trying to get code to work
1 Like
system
Closed
July 9, 2020, 6:33pm
24
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.