Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

refreshing jsp page

  Asked By: Chisisi    Date: Feb 03    Category: Java    Views: 1167
  

I have a one doubt in my jsp page.
I have used META TAG to refresh my page(gpsmmain.jsp) automatically for every 20 seconds like this.
<META HTTP-EQUIV="REFRESH" Content="20";URL="gpsmmain.jsp">
But at the time of refreshing it looks ackward(because it has some buttons and table).so do u have any idea how to avoid this.
please tell me if u have any idea abt this.
i will be waiting for ur replay

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Calais Bernard     Answered On: Feb 03

Instead of a META tag, you could use JavaScript to force a refresh.

In the HEAD section, you have:


<script type="text/javascript">
setTimeout ("oneSec ()", 1000);
var numSecs = 20;
function oneSec () {
numSecs--;
if (numSecs == 0) {
self.location.href = <This URL>;
} else {
setTimeout ("oneSec ()", 1000);
}
}
</script>

 
Didn't find what you were looking for? Find more on refreshing jsp page Or get search suggestion and latest updates.




Tagged: