Page 1 of 1

Dynamic Page navigation by values in mobileselect menu

Posted: Thu Mar 21, 2013 8:39 am
by Rahul Sinha

How can I enable dynamic page navigation based on values selected in mobileselect menu?

e.g. For the mobileselect I have values like "Apples", "Oranges" and "Mangoes".

Based on the value selected, I want a separate page to be navigated.

If Apples is selected, then page specific to Apples, if Oranges is selected, then page specific to Oranges and so on..

Appreciate your help in advance...


Dynamic Page navigation by values in mobileselect menu

Posted: Thu Mar 21, 2013 10:45 am
by Kateryna Grynko

Hi Rahul,

If you want to navigate to selected page, on button click add "Run JavaScript" action with the following JavaScript code:

codevar value = Tiggzi('menu').val();
navigateTo(value);/code
Replace 'menu' with Select Menu component name.


Dynamic Page navigation by values in mobileselect menu

Posted: Thu Mar 21, 2013 11:00 am
by Rahul Sinha

Hi Katya,
In my case, the values have spaces between words. e.g. "Current Location", "Registered Address" etc.

And I cannot create pages with spaces. Will the above-code still work?

regards,
Rahul


Dynamic Page navigation by values in mobileselect menu

Posted: Thu Mar 21, 2013 11:25 am
by Kateryna Grynko

In Options properties of Select Menu component, there is a Label column and a Value column:
Image

In Label, there should be a text displayed to user.
Value should contain name of the page you want to navigate to.


Dynamic Page navigation by values in mobileselect menu

Posted: Thu Mar 21, 2013 11:50 am
by Rahul Sinha

Thanks Katya, it works