Subversion Repositories SmartDukaan

Rev

Rev 11015 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11015 Rev 11110
Line 89... Line 89...
89
			alert("Unable to fetch items");
89
			alert("Unable to fetch items");
90
			return false;
90
			return false;
91
		},
91
		},
92
	});
92
	});
93
}
93
}
-
 
94
 
-
 
95
function showData(supc){
-
 
96
	jQuery.ajax({
-
 
97
		type : "GET",
-
 
98
		url : "/Support/snapdeal-scraper?supc="+supc,
-
 
99
		beforeSend: function(){
-
 
100
			$('#ajax-spinner').show();
-
 
101
		},
-
 
102
		complete: function(){
-
 
103
			$('#ajax-spinner').hide();
-
 
104
		},
-
 
105
		success : function(json) {
-
 
106
			var parsedData = JSON.parse(json);
-
 
107
			$('#scraping-data td').eq(0).html(parsedData.saholicSp);
-
 
108
			$('#scraping-data td').eq(1).html(parsedData.saholicOfferPrice);
-
 
109
			$('#scraping-data td').eq(2).html(parsedData.competitorSp);
-
 
110
			$('#scraping-data td').eq(3).html(parsedData.competitorOfferPrice);
-
 
111
			$('#scraping-data td').eq(4).html(parsedData.saholicRank);
-
 
112
			$('#scraping-data td').eq(5).html(parsedData.saholicInventory);
-
 
113
			$('#scraping-data td').eq(6).html(parsedData.competitorInventory);
-
 
114
			$('#scraping-data td').eq(7).html(parsedData.totalSeller);
-
 
115
			$('#hidden-data').show();
-
 
116
		},
-
 
117
		error : function() {
-
 
118
			alert("Unable to fetch details.");
-
 
119
			return false;
-
 
120
		},
-
 
121
	});
-
 
122
}