growth Posted June 7, 2006 Share Posted June 7, 2006 Hi !I have a page that shows a message using onload.The problem is when I go to others pages and after I go back with the browser to that one wich shows the message. The message appears again.How can I clean the message before go back with the browser to that page ?The code HTML :<% sMsg = (String)request.getAttribute(Defines.PARAM_MENSAGEM);%><%! public String exibe_msg() { String retorno = ""; if ( sMsg != null ) retorno = "alert('" + sMsg + "');"; return (retorno); }%></HEAD><BODY BGCOLOR="#FFFFFF" TOPMARGIN="0" LEFTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" onload="<%= exibe_msg() %>">Thank you. Link to comment Share on other sites More sharing options...
scott100 Posted June 7, 2006 Share Posted June 7, 2006 The problem is when I go to others pages and after I go back with the browser to that one wich shows the message. The message appears again.How can I clean the message before go back with the browser to that page ?You could use a cookie, set the value to pagevisited when they first visit the page then each time they return if the value is pagevisited don't show them the message, then set the cookie to expire like 20 mins after each visit or so Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now