Disable Auto refresh

Hi,

 I m doin a auto refresh using the following line of code
<META HTTP-EQUIV=Refresh CONTENT="<%=refreshSeconds%>; URL=sample.do?saddAction=sample">


I have to enable and disable refresh at certain conditions?

How can this be achieved?
ramsharma23Asked:
Who is Participating?
 
bloodredsunCommented:
<%
String refreshSeconds = request.getParameter("time")!=null ? request.getParameter("time") : 10000 ;
%>
<META HTTP-EQUIV=Refresh CONTENT="<%=refreshSeconds%>; URL=sample.do?saddAction=sample&time=100000">

sets the refresh time via a request parameter that you can then alter to your needs (the initial bit uses a ternary operator to prevent a null when assigning the string)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.