ajax works but appear again after refresh ..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • waqaspuri
    New Member
    • Jun 2013
    • 4

    ajax works but appear again after refresh ..

    help make additional changes in code that it should appear for once .. it keeps on coming on going back to the html page, I'm bad in ajax code.

    Code:
    <script type="text/javascript">
     // close the div in 5 secs
     window.setTimeout("closeHelpDiv();", 5000);
     
     function closeHelpDiv(){
     document.getElementById("helpdiv").style.display="none";
     }
     </script>
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    It has nothing to do with AJAX. Page refreshes do not hold on to prior states. That is the point of a page refresh.

    If you need to hold on to a prior state, then you either need to store that info on the server and use server side scripting to change what the user sees between refreshes or you need to store it in a cookie on the client's computer and use javascript to read/write the cookie.

    Comment

    Working...