William Fulton
Posts: 0
Joined: Tue Feb 18, 2014 7:51 pm

Jump menu help

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', {});

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

Jump menu help

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).

William Fulton
Posts: 0
Joined: Tue Feb 18, 2014 7:51 pm

Jump menu help

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.

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

Jump menu help

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.

Return to “Issues”