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

  • SEARCH
  • Home
  • 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 9115183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:22:12+00:00 2026-06-17T04:22:12+00:00

I am trying to use a plugin for a dropdown which takes in JSON

  • 0

I am trying to use a plugin for a dropdown which takes in JSON data for options values for the selects.
http://designwithpc.com/Plugins/ddSlick

$('#myDropdown').ddslick({
    data:ddData,
    width:300,
    selectText: "Select your preferred social network",
    imagePosition:"right",
    onSelected: function(selectedData){
        //callback function: do something with selectedData;
    }   
});

Here ddData is the JSON variable that has the data for the dropdown. I am trying pulling the data from server using jQuery.getJSON(), I am having two problem.

  1. How do I cache the data?
  2. How do I get the jsondata from server and directly feed into this function above?

From looking at examples of jQuery.getJSON() it does a callback to use data inside. So I am not sure how to get pass the result directly.

I was looking for something like below, but its not working.

$('#myDropdown').ddslick({
    data:$.getJSON('ajax/test.json'),
    width:300,
    selectText: "Select your preferred social network",
    imagePosition:"right",
    onSelected: function(selectedData){
        //callback function: do something with selectedData;
    }   
});
  • 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-17T04:22:13+00:00Added an answer on June 17, 2026 at 4:22 am

    If you want to pass the data object to the ddslick argument object you have to work in the getJSON callback function as you can seen the jQuery doc API

    $.getJSON('ajax/test.json', function(data) {
      var window.myCachedData = data;
    });
    
    $('#myDropdown').ddslick({
        data: windows.myCachedData || {},
        width:300,
        selectText: "Select your preferred social network",
        imagePosition:"right",
        onSelected: function(selectedData){
            //callback function: do something with selectedData;
        }   
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use the autocomplete plugin for jQuery (this one http://docs.jquery.com/Plugins/Autocomplete ). My
I am trying to use this plugin: http://docs.jquery.com/Plugins/Validation Where #user_new is the id for
so I'm trying to use this plugin: http://code.google.com/p/zeroclipboard/wiki/Instructions which basically allows you to set
I'm trying to use this jquery plugin ( http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/ ) on an aspx page
I am trying to use Chosen plugin by harvest (http://harvesthq.github.com/chosen/) and it works for
I'm trying to use this plugin http://www.cssnewbie.com/example/equal-heights/plugin.html but haven't used much javascript before. It
I've been trying to use this plugin -> http://code.drewwilson.com/entry/autosuggest-jquery-plugin (broken link, see github ),
I'm trying to use this plugin http://valums.com/ajax-upload/ . I added a file-limit, I want
I'm trying to use the plugin (http://www.vertstudios.com/blog/jquery-sticky-scroller-position-fixed-plugin ) on a page i'm building. I'm
I'm trying to use jQuery SVG plugin http://keith-wood.name/svg.html And in the very beginning I

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.