Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8881741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:24:20+00:00 2026-06-14T20:24:20+00:00

My json response is like this (as per firebug) [ { value: 1, text:

  • 0

My json response is like this (as per firebug)

[
{
    "value": 1,
    "text": "Bill_Process_1",
    "selected": false,
    "imageSrc": "image.jpg",
    "description": "Bill_Process_1"
},
{
    "value": 2,
    "text": "Bill_Process_2",
    "selected": false,
    "imageSrc": "image.jpg",
    "description": "Bill_Process_2"
},
{
    "value": 3,
    "text": "Bill_Process_3",
    "selected": false,
    "imageSrc": "image.jpg",
    "description": "Bill_Process_3"
},
{
    "value": 4,
    "text": "Bill_Process_4",
    "selected": false,
    "imageSrc": "image.jpg",
    "description": "Bill_Process_4"
},
{
    "value": 5,
    "text": "Bill_Process_5",
    "selected": false,
    "imageSrc": "image.jpg",
    "description": "Bill_Process_5"
}

]

Please help me to complete this code.its just show empty drop down.
I’m confused with how to render it to here..

        <div id="myDropdown"></div>
<script type="text/javascript">
    var jsonurl = 'dropDown.html';
    $.ajax({
          type: 'GET',
          url: jsonurl,
          data: {},
          success:function(data){
                 var options = $("#myDropdown");
                 $.each(data, function () {
                     alert(data);
                     options.append($("<option />").val(this.value).text(this.text));                        
                 });
             },
          error:function(){             
          }
        });     

    $('#myDropdown').ddslick({
        data : jsonurl,
        width : 300,
        selectText : "Select the bill process",
        imagePosition : "right",
        onSelected : function(selectedData) {
            //callback function: do something with selectedData;
        }
    });
</script>

I used spring @ResponseBody to return this json array.

I used ddslick for my drop down.here shows it is

ddslick drop down by jquery code

Now my out put like this.its not data loaded to div as drop down and on webpage it shows as list one by one

My output

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:24:21+00:00Added an answer on June 14, 2026 at 8:24 pm

    You should go with something like this:

     success:function(data){
         var options = $("#myDropdown");
         $.each(data, function () {
             options.append($("<option />").val(this.value).text(this.text));
         });
     },
    

    in your AJAX success handler to solve the problem of drop-down being empty. I’m not too sure what you’d like to achieve on select.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

a sample of json response looks like this: {publicId:123,status:null,partner:null,description:null} It would be nice to
I am getting json response like this {item_id:1,item_title:Item 1}{item_id:2,item_title:Item 2} how would I parse
i am getting the JSON response like this : [ {IndexID:1,IndexName:Consumer Confidence Index(CCI),IndexValue:34.79,Month:10,PercentageChanged:0,Position:0,Year:2011}, {IndexID:1,IndexName:Consumer
Google returns Unparsable Cuft to the json response like this: throw 1; <dont be
I'm very new to Python. I have a JSON response like this : {
When i try to send a HTTP request to get JSON response like this:
I have a Json Response like this. { ss: 1, tc: 75, pn: 1,
My JSON response looks like this: { themes: [ [ Direction des Routes Secteur
Friends I have a json response like this {status:1,responseCode:1000,response:{actorGuid:1,daRemarks:Device is Nonoperational,serialNumber:1234567}} I am successfully
Currently I get back a JSON response like this... {items:[ {itemId:1,isRight:0}, {itemId:2,isRight:1}, {itemId:3,isRight:0} ]}

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.