Subversion Repositories munaweb

Rev

Rev 10 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10 Rev 19
Line 29... Line 29...
29
// Create new page for product info
29
// Create new page for product info
30
function _cb_FindProducts(root) {
30
function _cb_FindProducts(root) {
31
	var ack = root.Ack;
31
	var ack = root.Ack;
32
	if (ack != 'Success') {
32
	if (ack != 'Success') {
33
		var x = document.getElementById("warnings");
33
		var x = document.getElementById("warnings");
-
 
34
        var str = '<div class="alert alert-danger' alert-dismissible">';
-
 
35
        str += '<button type="button" class="close" data-dismiss="alert">×</button>';
34
		x.innerHTML = "<h2>eBAy API Error<h2>";
36
		str += "<h2>eBay API Error<h2>";
-
 
37
		str += "<ul>"
35
		x.innerHTML += "<p>Id: " + root.Errors[0].ErrorCode + "<br/>";
38
		str += "<li>Id: " + root.Errors[0].ErrorCode + "</li>";
36
		x.innerHTML += "<p>Domain: " + root.Errors[0].ErrorClassification + "<br/>";
39
		str += "<li>Domain: " + root.Errors[0].ErrorClassification + "</li>";
37
		x.innerHTML += "<p>Severity: " + root.Errors[0].SeverityCode + "<br/>";
40
		str += "<li>Severity: " + root.Errors[0].SeverityCode + "</li>";
38
		x.innerHTML += "<p>Category: " + root.Errors[0].category + "<br/>";
41
		str += "<li>Category: " + root.Errors[0].category + "</li>";
39
		x.innerHTML += "<p>Short Message: " + root.Errors[0].ShortMessage + "<br/>";
42
		str += "<li>Short Message: " + root.Errors[0].ShortMessage + "</li>";
40
		x.innerHTML += "<p>Long Message: " + root.Errors[0].LongMessage + "<br/>";
43
		str += "<li>Long Message: " + root.Errors[0].LongMessage + "</li>";
41
		x.innerHTML += "<p>Build/Version: " + root.Build + '/' + root.Version + "</p>";
44
		str += "<li>Build/Version: " + root.Build + '/' + root.Version + "</li>";
-
 
45
		str += "</ul>"
42
		x.innerHTML += "<p>URL: " + "<a href=\"" + url + "\" target=\"_blank\">" + url + "</a>" + "</p>";
46
		str += "<p>URL: " + "<a href=\"" + url + "\" target=\"_blank\">" + url + "</a>" + "</p>";
-
 
47
		str += "</div>"
43
 
48
 
-
 
49
    	x.innerHTML = str;
44
    	x.className = x.className.replace(" invisible", " visible");
50
    	x.className = x.className.replace(" invisible", " visible");
45
 
51
 
46
		if (ack == 'Failure' || ack == 'PartialFailure') {
52
		if (ack == 'Failure' || ack == 'PartialFailure') {
47
			x.scrollIntoView(true);
53
			x.scrollIntoView(true);
48
			return;
54
			return;