当站点在服务器上时发生内部错误,在localhost上它可以正常工作。代码如下所示。
获取http://www.olbx.in/classified/extract_handler_post.php 500(内部服务器错误)x.ajaxTransport.send @jquery-1.10.2.min.js:6x.extend.ajax @jquery-1.10.2.min.js:6(匿名功能)@书籍分类:281(匿名功能)@书籍分类:345
增加超时时间无济于事
完整错误:
$.ajax({
type: 'GET',
url: '../classified/extract_handler_post.php',
data: SendInfo,
dataType: 'json',
contentType: "application/json; charset=utf-8",
success: function (data) {
count = data['count'] ;
for ( i = 0 ; i < count ;i++ ) {
// $("#details").append(data['data'][i]['author']);
//if (data['data'][i]['category']=="Books"){
var iDiv = document.createElement('div');
iDiv.id = 'block';
iDiv.className = 'grid_12';
document.getElementsByTagName('article')[0].appendChild(iDiv);
// Now create and append to iDiv
var innerDiv = document.createElement('div');
innerDiv.className = 'grid_2 alpha';
// The variable iDiv is still good... Just append to it.
iDiv.appendChild(innerDiv);
if (data['data'][i]['source'] == "Flipkart"){
innerDiv.innerHTML = '<img src=../images/classifiedlist/flipkart_logo.png ></img>';
}
else if (data['data'][i]['source'] == "Landmark"){
innerDiv.innerHTML = '<img src=../images/classifiedlist/landmark_logo.png ></img>';
}
else if (data['data'][i]['source'] == "Amazon"){
innerDiv.innerHTML = '<img src=../images/classifiedlist/Amazon-India-Logo.png ></img>';
}
else if (data['data'][i]['source'] == "RediffBooks"){
innerDiv.innerHTML = '<img src=../images/classifiedlist/rediff_logo.png ></img>';
}
// Now create and append to iDiv
var innerDiv = document.createElement('div');
innerDiv.className = 'grid_10 omega';
// The variable iDiv is still good... Just append to it.
iDiv.appendChild(innerDiv);
innerDiv.innerHTML = data['data'][i]['source'] +"<br/>Bookname: " + data['data'][i]['title'] + "<br/> List Price: " + data['data'][i]['mrp'] + " Sale Price: " + data['data'][i]['available_price'] +" <br/><a href=" + data['data'][i]['url'] +">Shop now </a> <br/> <br/>" ;
}