Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Anas_F_
Beginner
54 Views

$.ajax or $.getJSON froze activate_subpage in real device

Hello,

I have a little problem regarding activate_subpage and JSON functions. I have code below:

function configureSurahList() {

            $.ajax({
                url: 'media/surah-list.json',
                success: function (result) {

                    $('#surah-selectorz').html('');
                    $.each(result.surah, function (k, v) {
                        $('#surah-selectorz').append('<option value="' + v.id + '">' + v.name.toUpperCase() + ' (' + v.meaning.toUpperCase() + ')' + '</option>');
                    });
                    $('#surah-selectorz').prepend('<option value="0">ALL</option>');
                    $('#surah-selectorz').trigger('update');

                    $('#surah-selectorz').change(function () {
                        var idx = $('#surah-selectorz').val();
                        configureVerseList(idx);
                    });

                    /*global activate_subpage */
                    activate_subpage("#quran-search-page");
                    
                }
            });

}

This function executed well in emulator, but not in real device (via Intel App Preview app on Android phone). Please enlighten me. Thanks.

Tags (2)
0 Kudos
1 Reply
PaulF_IntelCorp
Employee
54 Views

I recommend you debug this using the Debug tab, you'll get a full debug environment with CDT to determine what is going on.

Also, update the jQuery library to jQuery 2, see this FAQ > https://software.intel.com/en-us/xdk/faqs/app-designer#ajax-jquery-one-fail <

Reply