The show function, according to my logic, should not reload the page, but simply updated but no, it reboots.
How can I just make it refresh without reloading the page?

<html> <head> <meta charset="utf-8"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> <script type="text/javascript" src="jquery.js"></script> </head> <body> <div id="content"> <iframe name='chatWindow' id='chatWindow'frameborder="no" height="935" width="935" src='iframe.php'>Chat</iframe> </div> <br> <input type='text' id="text" name='message'> <input type='button' id="button" value="send"> <script> $(document).ready (function ( ){ show(); setInterval("show()",100); $("#button").bind("click", function (){ var message = $("#text").val(); $.ajax ({ url: "iframe.php", type: "POST", data: {message}, dataType: "html" }); }); $("#button").bind("click", function (){ $.ajax({ url: "chat.html", cache: false, success: function(html){ $("#content").html(html); } }); }); function show() { $.ajax({ url: "chat.html", cache: false, success: function(html){ $("#content").html(html); } }); } }); </script> </body> </html> 
  • "but it reboots." - how do you know? In the code that you showed, there is nothing that would lead to a page reload. - Igor
  • Aaa, I'm starting to guess. Is your frame page reloading? - Igor
  • @Igor show (); setInterval ("show ()", 100); reloads the page to me - NoProgress
  • which page? You have two. - Igor
  • @Igor iframe.php and chat.html and turn on by pressing the message button also reloads the page - NoProgress

0