Jump to content
Sign in to follow this  
snoopydogg

Drop down list json

Recommended Posts

Hi,

i'm trying to create a select option tag on my json data to say 'select country' and then when the user clicks on the drop down arrow, they are able to see a list of all the countries to choose from.

This is what i have at the moment but im not sure how to add the select option tag.

if(getCurrency.opstatus ==  0){
  var currencies = getCurrency.currencies;
  var currencyListkData = [];
  var keys = Object.keys(currencies);
  keys.sort();
 
 
   for(var i=0;i<keys.length;i++){
     currencyListkData.push([keys,currencies[keys]+"("+ currencySymbolTab[keys]+")"]);
   
   }
  self.view.ListBox1.masterData = currencyListkData;
  self.view.ListBox2.masterData = currencyListkData;
  
}else{
  kony.print("Error in service invocation")
}

 

thanks.

Share this post


Link to post
Share on other sites

What is self.view? It looks like you may be using some kind of framework. Without knowing which framework you are using and how the framework works I can't tell you how to solve this.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...