Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 282
  • Last Modified:

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?
0
ramsharma23
Asked:
ramsharma23
1 Solution
 
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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now