#6891 closed bug
Dynamic select box (size 5) does not refresh for single value until mouse over
Reported by: | plohiya | Owned by: | plohiya |
---|---|---|---|
Priority: | low | Milestone: | 1.5 |
Component: | manipulation | Version: | 1.3.2 |
Keywords: | select size | Cc: | |
Blocked by: | Blocking: |
Description
I am using the below ajax code to populate a select tag. The code works fine for multiple values but fails for single value. I am not using Json its a java call.
HTML code: <select name="xx" id="xxSelect" size="5"></select> <img alt="Search" class="searchXX" src="xx" id="searchXX" />
jquery code: $('.searchXX').click(function(e) {
$.ajax({ type: "GET", url: "/x/x/xx/getxx.xml?xxName="+xxName , dataType: "xml", success: function(xml) {
Create Options from Response var options = ""; $('#xxSelect').html(options); $(xml, "root>xxxx").find("xxx").each(function() {
options+= '<option>'+$(this).find("xxName").text()+'</option>';
}) $('#xxSelect').html(options);
}
})
});
The above code works fine if i have a list of size more than 1 but fails if the 1st list was of size 1 and the second list was of size 1. ex: 1012 and 1013 fails as two different output values.
Change History (2)
comment:1 Changed 12 years ago by
Component: | ajax → manipulation |
---|---|
Keywords: | size added; box removed |
Milestone: | → 1.5 |
Owner: | set to plohiya |
Priority: | → low |
Status: | new → pending |
comment:2 Changed 12 years ago by
Status: | pending → closed |
---|
Automatically closed due to 14 days of inactivity.
Can you put this code into a working jsFiddle for us to check out. It helps us get through bugs like this much faster. Thanks so much!