Jordi Niubo
Posts: 0
Joined: Tue Nov 26, 2013 12:08 pm

SelectMenu component options

Hi

I have a selectMenu with some options ("A", "B","C", ....);

In custom properties i can select the option selected. This option will be the first selected option in all time.

My questions:

1) I would like to design something that without click in the selectMenu the option selected will change. My idea is to have the selectMenu in the second Page of the project and this page can load diferent data. Depending of the data, the first option selected will change. What is the function to do this?

2) I read some documentation but some UI components have different functions. There are any Documentation about specific functions to work with JS?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

SelectMenu component options

Hi Jordi,

[quote:]I would like to design something that without click in the selectMenu the option selected will change. My idea is to have the selectMenu in the second Page of the project and this page can load diferent data. Depending of the data, the first option selected will change. What is the function to do this?
[/quote]You would need to use custom JavaScript code. I'll check how you can do this.

[quote:]I read some documentation but some UI components have different functions. There are any Documentation about specific functions to work with JS?[/quote]All the specific information can be found in our documentation. Do you have any specific question?

Jordi Niubo
Posts: 0
Joined: Tue Nov 26, 2013 12:08 pm

SelectMenu component options

Hi Katya

Now I only have this question about the selectMenu but I would like to learn more about this.

In some tutorials I have seen diferents functions. As a example: http://docs.appery.io/tutorials/build...
.append('​' + newData + '');
.selectmenu('refresh');

There are any documentation about this for each UI component? Is for learning and be more independent. I have not seen any documentation about this. Posible I searched in wrong section.

Thanks

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

SelectMenu component options

Hello! See FAQ #9 http://docs.appery.io/getting-started/. You can refer to jQuery, jQuery Mobile docs to get more information.

Jordi Niubo
Posts: 0
Joined: Tue Nov 26, 2013 12:08 pm

SelectMenu component options

Hi Maryna

Thanks, this functionality works!

For other people that possible have the same problem, is easy.

Solution:
var selected = localStorage.getItem('item'); //"item" is a local variable
var list = $('[name=input_list]');
list.val(selected);
list.selectmenu('refresh');

Thanks for your time Maryna and Katya

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

SelectMenu component options

Hi, thank you for sharing that!

Return to “Issues”