By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,985 Members | 1,776 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,985 IT Pros & Developers. It's quick & easy.

ajax works but appear again after refresh ..

P: 4
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.

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.  // close the div in 5 secs
  3.  window.setTimeout("closeHelpDiv();", 5000);
  5.  function closeHelpDiv(){
  6.  document.getElementById("helpdiv").style.display="none";
  7.  }
  8.  </script>
Jun 21 '13 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 10K+
P: 12,349
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.
Jun 21 '13 #2

Post your reply

Sign in to post your reply or Sign up for a free account.