$.ajax never ending loop stop
I have a html-document, in which I want to load a table from an extern html-file. In this file should be another load to the same file. When I start this, I get an enless loop. Can anybody tell me how I can still end the loading after 10 times?
Ok, here is some of my code
html-document:
<html>
<head>
<sc开发者_Python百科ript type="text/javascript" src="jquery-1.6.2.min.js"></script>
<script type="text/javascript">
function table(){
$.ajax({
url: "table.html",
success: function(data) {$('#test1').html(data);},
error: function(){alert('no!');},
});
</script>
</head>
<body>
<input type="Button" onclick="table();" value="KNOPF" id="knopf"/>
<p id="test1">TEST </p>
</body>
</html>
table
<html>
<head>
<script type="text/javascript" src="jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$.ajax({
url: "table.html",
success: function(data) {
$('#test1').html(data);},
error: function(){alert('no!');},
});
</script>
</head>
<body>
<p id="test1"><p>
<table border="1">
<tr><td>1</td></tr>
</table>
</body>
</html>
It might be probably server-side redirecting/header redirecting. Check if you have some redirects in your script(s)
精彩评论