Side navigation
#6891 closed bug ()
Opened August 09, 2010 09:34PM UTC
Closed November 11, 2010 11:09PM UTC
Last modified March 13, 2012 10:11PM UTC
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.
Attachments (0)
Change History (2)
Changed October 25, 2010 07:40AM UTC by comment:1
component: | ajax → manipulation |
---|---|
keywords: | select box → select size |
milestone: | → 1.5 |
owner: | → plohiya |
priority: | → low |
status: | new → pending |
Changed November 11, 2010 11:09PM UTC by comment:2
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!