Refreshing a div using javascript in PHP -


so creating approve or deny page several users in php , page building needs refresh

1.what trying refreshing specific div

     function refresh in javascript working there      sudden duplication of div.  

i checked several times , there no double(2) input="type" search.

what line should modify in remove duplicate search in div ref1 ?

  1. can guys please suggest alternative way refresh div ?

enter image description here

<style>             #ref2{                 background-color: darkseagreen;             } #ref1{                 background-color: pink;             }         </style>          <body>          <div id="ref1">                 shortcut preview **                php -> isset ....add, delete, approve, search                                        view content (select * dbname)                   see image ^     </div>         <div id="ref2">              <form action="tor.php" method="post">                <input type="text" name="search" placeholder="search members.." onkeydown="searchq();" required  />                <input type="submit" value=">>">                <?php echo("$output"); ?>             </form>                 </div>     <script langauge="javascript">      function updatecontent() {      $.get("#", function(data)       {           $("#ref1").html( data );           });      }          setinterval(updatecontent, 1000);      </script>  </body>  </html>

you need content of ref1 div replace previous content with, entire html page , replace div content it.

function updatecontent() {    $.get("#", function(data)     {     var x = document.createelement("div");          x.innerhtml = data;        $("#ref1").html( $(x).find("#ref1").html());      }); }     setinterval(updatecontent, 1000); 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -