Page 1 of 1

Jump menu help

Posted: Mon Mar 17, 2014 6:29 pm
by William Fulton

How to make a jquery jump menu go to different pages based on selection. I have been working on this for awhile and I cannot make it work.

I'm trying to use some jquery jump menu code I found and cross it with the javascript API for going to a particular page but I can't make it work. Here is the code for the jump menu:
$('#url').change(function() {
var url = $("#url").val();
if(url !="")
{
$("#jump").attr("action", url);
$("#jump").submit();
}
});

Here is the code for the javascript API:
Appery.navigateTo('menuPage', {});


Jump menu help

Posted: Mon Mar 17, 2014 7:13 pm
by Maryna Brodina

Hello!
On any event you need (Select value change or button Click, or any other event) add run JS action. In this code retrieve Select value http://docs.appery.io/documentation/j... and depending on that value navigate where you need (Appery.navigateTo).


Jump menu help

Posted: Mon Mar 17, 2014 7:30 pm
by William Fulton

Yes, I tried to use this before as well. I could never get the value of the selected item to pass in to the variable.

So, right now I have mobileselect_menu action set to on value change run javascript of:
Appery.navigateTo('value', {});

This does nothing.


Jump menu help

Posted: Mon Mar 17, 2014 9:48 pm
by Maryna Brodina

To retrieve Select value use preAppery("mobileselectmenuName").val()/preIf you add code on value change, you can use pre$(this).val()/preIf in Select value there is a screen name where you navigate (note it's case sensitive). You can use the following code preAppery.navigateTo( Appery("mobileselectmenuName").val(), {}); /prewhere mobileselectmenuName - select name.