Click here to Skip to main content
14,735,180 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
$("#topshops").empty();
						//	var displaynames=["No. OF TIMES ORDERED/TOTAL NO. OF TIMES ORDERED","DESCRIPTION","PLACE","SHOPMAILID"]
							var output=JSON.parse(decodeURIComponent(data.output));
							
						for (var i=0;i<output.length;i++){>
							  var ShopListDiv = $(' <div class=" col-lg-12 col-md-12 HotelList" id="HotelList"> </div>');
       						  var ShopHeaderDiv = $('<div class="col-lg-12 col-md-12  HotelHeader">' + output[i].myfavourite + '</div>');
     					      var ShopImage = $('<img class="img-responsive col-lg-3 HotelImage" style="max-width: 200px;max-height: 200px;" src=' + output[i].image + '>');
						      var ShopText = $('<div class="col-lg-9 col-md-9 HotelText"></div>');
							//  var shoplistimage=["images/Heart-icon.png","images/Actions-mail-mark-task-icon.png","images/City-Church-icon.png","images/Mail-icon.png"];
							//  var ArrayText = [output[i].count1,output[i].total_purchase,output[i].description,output[i].city,output[i].shopmailid];						
								 var ShopInnerText = $('<div></div>');

                                

						   /*
							 var shopname = $("<label></label>")
                  						 .prop("id", output[i].branch_id)
                  						 .text(output[i].myfavourite)
										 .css({
										 	
										 });
*/
										 
						
					      
						 var purchas_probability =$("<label></label>")
						 						 .prop("id",i)
												 .text(output[i].count1+"/"+output[i].total_purchase)
												 .css({
												  marginLeft: '5px'
												      });


						 /*
var shopimage = $("<img />")
                 					  .prop("id", i)
                  					  .prop("src", output[i].image)
                 					  .css({
                    				   width : '100px',
                    				   float: 'left'
            						       });
*/
										   
						 var shopicon=$("<img />")
                 					  .prop("id", i)
                  					  .prop("src","images/Heart-icon.png")
                 					  .css({
                    				   width : '18px',
                    				   height: '18px'
            						       });
				  var descriptionicon=$("<img />")
                 					 .prop("id", i)
                  		    		 .prop("src","images/Actions-mail-mark-task-icon.png")
                 					 .css({
                    				  width : '18px',
                    				  height: '18px'
            						        });
						  var shopdesc=$("<label></label>")
                  						 .prop("id",i)
                  						 .text(output[i].description)
										 .css({
										marginLeft: '5px'	
										 });
						  var cityicon=$("<img />")
                 					  .prop("id", i)
                  		    		  .prop("src","images/City-Church-icon.png")
                 					  .css({
                    				   width : '18px',
                    				   height: '18px'
            						        });
						  var city=$("<label></label>")
                  						 .prop("id",i)
                  						 .text(output[i].city)
										  .css({
										 marginLeft: '5px'	
										 });
						  var mailidicon=$("<img />")
                 					  .prop("id", i)
                  		    		  .prop("src","images/Mail-icon.png")
                 					  .css({
                    				   width : '18px',
                    				   height: '18px'
            						        });
						  var shopmailid=$("<label></label>")
                  						 .prop("id",i)
                  						 .text(output[i].shopmailid)
										 .css({
										 	 marginLeft: '5px'	
										 });
						
 							/*
var shoplink=$("<button></button>")
						  				.prop("id",i)
										.text("view more")
										.val("view more")
										.css({ "width": "45px", "height": "45px" });
*/

							 var ViewMenuButton= $('<button class="SearchButton openedshop" data-id="' + output[i].branch_id + '">'+aLangKeys[lang]['viewmenu']+'</button>');
							 ViewMenuDiv.append(ViewMenuButton);
							 ShopListDiv.append(ViewMenuDiv);
							 ShopInnerText.append(ShopListDiv);
							 ShopListDiv.append(shopimage).append(shopicon).append(purchas_probability).append("<br>").append(descriptionicon).append(shopdesc).append("<br>").append(cityicon).append(city).append("<br>").append(mailidicon).append(shopmailid).append("<br> <hr>");
							 ShopListDiv.append(ShopHeaderDiv);
    					     ShopListDiv.append(ShopImage);
      						 ShopListDiv.append(ShopText);
 					     
							}


This code is executing but its not displaying with class file
Posted
Updated 26-Jun-14 3:27am
v3

1 solution

First of all, the code is unreadable. Second, we cannot see the input data. Also, we didn't write the code and don't have a complete version. And although many of us consider ourselves human compilers, we are also inherently lazy.

Also, first break it down by just loading the data from the url ans simply show it. On succes, try processing some of it and go from there. Use F12 in your browser to get the debugger or download and install an extension for that. it can help you much better (also in the future).

Good luck!
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900