开发者

$.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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜