Software Archive
Read-only legacy content
17061 Discussions

Loading some data from database using $.post method through webapp not working

kulkarni__sameer
Beginner
339 Views

I built app using Inappbrowser plugin that accessing  dynamic page from server , within  page i am having  text box loading doctors list from server.I am loading doctors name using $.post method, it's loads  when page open in chrome browser and in xdk emulator but it's showing undefined index val error in actual app on mobile.I have attached two screenshots.Please help me .

Regards

Sameer kulkarni.

0 Kudos
5 Replies
PaulF_IntelCorp
Employee
339 Views

You probably have a Cordova whitelist problem. See this doc page for some help > https://software.intel.com/en-us/xdk/docs/using-cordova-whitelist-rules-with-intel-xdk < and also be sure to read the inAppBrowser doc page for any limitations there that may be imposed by that plugin > https://github.com/apache/cordova-plugin-inappbrowser <

0 Kudos
kulkarni__sameer
Beginner
339 Views

Paul F. (Intel) wrote:

You probably have a Cordova whitelist problem. See this doc page for some help > https://software.intel.com/en-us/xdk/docs/using-cordova-whitelist-rules-... < and also be sure to read the inAppBrowser doc page for any limitations there that may be imposed by that plugin > https://github.com/apache/cordova-plugin-inappbrowser <

As per your suggestion . i made changes to Network whitelist .still it's showing same error 'undefined index val'.I am using two more $.post method in jquery , these are working fine.only causes problem which used within keyup event , but it is working fine in simulate tab and in external web browser.Please tell me is anything to change still .Please it is very necessary to me

 

Regards

Sameer Klkarni

0 Kudos
PaulF_IntelCorp
Employee
339 Views

In general, the problem you are describing is caused by either a whitelist issue or a CSP rules issue. To get a handle on it, I recommend you try debugging a built app using remote CDT. See this page for some help > https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overview

0 Kudos
kulkarni__sameer
Beginner
339 Views

Paul F. (Intel) wrote:

In general, the problem you are describing is caused by either a whitelist issue or a CSP rules issue. To get a handle on it, I recommend you try debugging a built app using remote CDT. See this page for some help > https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overview

Sir i have analysed that i have put alert for debugging .All data are display in alert and in div tag.I used datalist with text box for autocomplete.I thought that it is problem with datalist , but it's working fine in chrome browser.Please help me .Code Snippet as below

 

Jquery

$("#doc_search").keyup(function(e) {
             var val=$(this).val();
             //alert(val);
             $.get('doctor_loading.php',{val:val},function(response){
             //alert(response);
               $(".doctor_list").html(response);
              });
        });

      
         

HTML

 <input type="text" class="form-control" id="doc_search" list="doctor_list" name="doc_search" 
<datalist id="doctor_list" class="doctor_list">
         
 </datalist>

 

 

0 Kudos
PaulF_IntelCorp
Employee
339 Views
0 Kudos
Reply