L
L
lasthero2011-04-27 00:24:17
JavaScript
lasthero, 2011-04-27 00:24:17

Ajax not working in io 6, 7?

There is a script:

$(document).ready(function(){     <br>
              <br>
                   setInterval(function(){<br>
                        $.ajax({<br>
                             url: '../test.php',             <br>
                             dataType : "html",  <br>
                             cache: false,                               <br>
                             type : "POST",<br>
                             data: "links=all",<br>
                             success: function (data) { <br>
                                       $('#tb_name').empty().html(data);<br>
                                       $("#tb_name").attr("style", "display:block");<br>
                                  },<br>
                             error:function(xhr, status, errorThrown) { <br>
                                  alert(errorThrown+'\n'+status+'\n'+xhr.statusText); <br>
                                  }<br>
                             });<br>
                   }, 10000);          <br>
              <br>
              });


Everything ok works in Firefox, Chrome, Opera and Explorer 8 and 9 versions. In donkeys 6 and 7, when it returns the result, then with $('#tb_name').empty().html(data); ($('#tb_name') - table) it clears the table but doesn't add new ones, which returned.
Already installed different features like $("#tb_name").attr("style", "display:block"); and header("Content-type: text/html; charset=utf-8"); so that everything returns in the desired encoding, but it does not plow the dog.
What could be the problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
galaxy, 2011-04-27
@lasthero

In IE (I don't know exactly what the versions are) you can't edit the innerHTML of tables: support.microsoft.com/kb/239832

L
lasthero, 2011-04-27
@lasthero

"display: block" can be ignored, I forgot to delete it.
All tags are closed. Example .

A
alexbeep, 2011-04-27
@alexbeep

Maybe try moving $ to the very end of body first and run it with some kind of timeout? In IE 6 and 7 everything is very bad with $(document).ready and with $(window).load - somehow it shoots out of place

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question