none
APPHOST6901: an app can't load remote web content in the local context RRS feed

  • Question

  • Hi,

    i have a cordova project. i'm trying to dynamically populate a list via ajax request but i get the error "APPHOST6901: an app can't load remote web content in the local context " .

    This is my ajax request code:

    var output = $('.swipe-wrap');
    $.ajax({
    		url: 'http://mywebsite.it/db_to_app_home.php',
    		dataType: 'jsonp',
    		jsonp: 'jsoncallback',
    		timeout: 2000,
    		success: function(data, status){
    			$.each(data, function(i,item){ 
    				var landmark = '<div><img src="http://mywebsite.it/images/'+item.img+'" style="width:100%;"></img></div>';			
    				output.append(landmark);
    
    			}); 
    			var element = document.getElementById('mySwipe'),
        prevBtn = document.getElementById('prev'),
        nextBtn = document.getElementById('next');
    
    window.mySwipe = new Swipe(element, {
      startSlide: 0,
      auto: 3000,
      draggable: true,
      autoRestart: true,
      continuous: true,
      disableScroll: true,
      stopPropagation: true,
      callback: function(index, element) {},
      transitionEnd: function(index, element) {}
    });
    
    		},
    		error: function(){
    			$( "#popupDialog" ).popup( "open" )
    		   //output.text('Non sei connesso ad internet! Abilita una connessione dati e riavvia l\'app!');
    		}
    });

    I'm developing a Windows Universal App for Windows Phone 8.1 . Using Visual Studio 2015 . Cordova 6.1.1 .

    Wednesday, December 14, 2016 11:37 AM

All replies