Languages

Menu
Sites
Language
Parsing emulator and simulator

hello,

i'm having a problem with the xml parsing on the emulator. in fact it is working on the simulator and not showing any errors on the console but not responding on the emulator. the code i'm using is below. 

for the main:
 

var initsamsung = function () {
    // TODO:: Do your initialization job
    console.log("init() called");
 
    alert("0000000*****");
    if ( ParserSamsung.initsamsung()) {
          alert("111*****");
        ParserSamsung.DatasamsungReceivedCallback = function() {
		var i; 
  	

		  alert("222*****");
		 
		 
		    for(i=0; i<Datasamsung.getNomCount(); i++){
		    
		    	var div = document.createElement("div");
		    	
		    	  alert(Datasamsung.getNom(0));

          
		    	  div.innerHTML='<div class="info-box"> <div class="info-box"><span class="info-box-icon bg-aqua"><img src="http://'+Datasamsung.getimage1(i)+'"  width="90x" height="80px"></a></span><div class="info-box-content"><span class="info-box-text">'+Datasamsung.getNom(i)+'</span><span class="info-box-number"><small></small></span></div><!-- /.info-box-content --></div><!-- /.info-box --></div><!-- /.col -->';
 
				    alert(Datasamsung.getimage1(i))
				    document.getElementById("listesamsung").appendChild(div);  
				    }
				 
				  
				  
				    
		        };
		      
		        ParserSamsung.fetchDatasamsung(); 
				
		    }
		    else {
		       
		    }





		};
		$(document).bind('pageinit', initsamsung);

 

on the Simulator the two first alerts are working, the problem starts with the third one which  weirdly, works perfectly on the simulator


 

 

Responses

2 Replies
Vikram

Hello,

Even if there is no error in the console, you can find some message when you run your code in debug mode. How about you execute your application by Debug as in the emulator?

 

Vikram

Hello,

Can you open relevant code in  Datasamsung and ParserSamsung? It looks like that core loops existed in there.