Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

Select Menu Default Value

I have a Select menu populated by a service. On Success of that service, I want the select menu to go back to the default value that it shows on page show. I can do this with a button using:

Apperyio("job_cat_select").prop('selectedIndex', 0).refresh();

but when I put that same code in the on success event of the service it seems to do nothing as the options change to the first option with a value (the default value is an option with a label but no value)

Any suggestions?

Pavel Zarudniy
Posts: 0
Joined: Mon Jul 06, 2015 8:56 am

Select Menu Default Value

Hi Jack,
Please check that your success event is called properly and also could you check are there any errors in console? http://devcenter.appery.io/documentation/debugging/

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

Select Menu Default Value

I didn't see any errors pertaining to this in the console but I did get this notification when logging in:

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.

As far as I know I have the success event calling properly because some of the code in that event fires correctly and the service itself achieves success. This is the whole code in the event.

Appery("job_cat_select").val("").selectmenu('refresh');
Appery("task_select").val("").selectmenu('refresh');
Appery("name_input").val("");
Appery("details_input").val("");
$('[dsid="radio_active"]').find('input').prop("checked", true).checkboxradio("refresh");
$('[dsid="radio_dis"]').find('input').prop("checked", false).checkboxradio("refresh");

I changed up the code to reset the select menus and I still get the same issue, however, I should clarify. This is on the success of a create service. The service is invoked by a button on a page that remains visible to allow users to enter more records, and the select menus do not affect each other. The select menus initialize showing the proper default values, then on the first success the option selected changes to the first options with a value, and finally on the second and all subsequent successes the select menus properly change to the desired default values (option with labels and no value).

Is this a bug?

Pavel Zarudniy
Posts: 0
Joined: Mon Jul 06, 2015 8:56 am

Select Menu Default Value

Hi Jack,

Please share (http://devcenter.appery.io/documentat...) your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and provide us with the following information:

1) App name
2) Test credentials if login functionality is implemented in your app
3) Detailed steps to reproduce the issue

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

Select Menu Default Value

App is shared and is named BC Speedway.

To login and recreate the issue:
1) Click the SUPPORT button on the login page located at the top right (this will log you in and take you to the dialog where the issue is occurring).
2) Take note of the default values in the select menus.
3) Select any items (or none) from the two select menus.
4) Click the button "Add More" and watch the selected values reset incorrectly.
5) Select any items (or none) again from the the two select menus.
6) Click the button "Add More" and watch the selected values reset correctly this time.

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

Select Menu Default Value

This will result in making records in my database, but please do so without hesitation. I will know which ones to delete easily when it is all done.

Jack Bua
Posts: 0
Joined: Sun Jun 28, 2015 10:16 pm

Select Menu Default Value

Any update on this?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Select Menu Default Value

Not yet, working on it.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Select Menu Default Value

Jack, we have reported a bug. Working to fix.
Please stay tuned.

Return to “Issues”